I have a class called create_challenge here:

http://code.google.com/p/pledgedrivetracker/source/browse/pledgedrives/controllers/default.py?spec=svn74b5784e200a53af235d6ea9abc83359e0ce3196&r=74b5784e200a53af235d6ea9abc83359e0ce3196#415

This model for the challenge has a foreign key to the person table.

In the resulting form to create a challenge, I would like the contents
of the select tag to only contain a list of people who were created by
the current user.

I believe the query for this selection might look like this:

persons=db(db.person.created_by==auth.user.id).select
(orderby=db.person.name)

However, I'm unsure how to work this into the form.  Or, would I
define this in the model instead?

Any suggestions that you have would be appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.

Reply via email to