On 2/3/07, Ivan Sagalaev <[EMAIL PROTECTED]> wrote:
> I have a better proposal. We can just defer getting 'choices' for
> <select> until 'render' is called. Thus if the field is never displayed
> in template it won't hit database. I'm not sure how to do it properly
> though... I see two ways now:
>
> - 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.
>
> I better like first option. What do you think?

The first option sounds better to me, too. Are you willing to code up a patch?

Adrian

-- 
Adrian Holovaty
holovaty.com | djangoproject.com

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