Thanks for excellent advice and suggestions posted on this list.

I'm still learning Django and Python, though I decided to give it a try 
in one of my larger projects.

I'm trying to add a few forms to my templates and I have a question 
about filtering some form elements, particularly in related <select> 
fields controls.

I'm trying to present an "add/edit photo" form to a user. Each photo is 
associated with a user album and I'd like to limit the list of albums in 
select box to a current user.

How can I do this using "form" object? Or do I have to pass this list of 
albums to the template:

my_albums = Album.objects.filter(owner = request.user)

and then construct a select box based on that list. If so, I'd probably 
"break out" of {{ form.albums }} and loose {{ form.errors }}. Is that so?

If not, how should it be done using Django {{ form }}?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to