> Or do I have to pass this list of
> albums to the template:
>
> my_albums = Album.objects.filter(owner = request.user)

This will work.

>
> 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?

No. You will not lose form.errors. If you plan to render in HTML just
that particular album selection drop-down, all you need to make sure is
that you use the same form field names that Django's would've used.
Then when such a form is submitted the manipulator will see the posted
data exactly like it would had you used Django's own select renderer.
So, you will get the necessary form.error field for your select
element.

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

Another option is to use a custom manipulator. You can then fully
control what shows in the select list right when the custom manipulator
gets initialized. The custom manipulator can even extend the default
manipulator if you wish -- this is especially useful if you only want
to change the behaviour of a small number of fields and are happy with
how the default manipulators handle the rest of your fields.

This code excerpt by Ivan might help:
http://groups-beta.google.com/group/django-users/msg/f1635e9a27c6ae68


--~--~---------~--~----~------------~-------~--~----~
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