On 2/3/07, Ivan Sagalaev <[EMAIL PROTECTED]> wrote:
> - Turn Field.get_choices into a generator. It now actually fetches rows
> and wraps them into a list and adds a 'blank' choice.
> - Allow a callable in 'choices' param of a Select widget that will be
> called on 'render'. It then can be passed as lambda calling form's choices.

One suggestion that I kind of like is the ability to pass a QuerySet
to 'choices' and, in that case, have it generate the choices from,
say, the id and __str__ of each object in the QuerySet.

Since it doesn't actually need those values until render time, it
could take advantage of the laziness of QuerySet evaluation to avoid
hitting the DB at all when the field is never shown.

-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to