I have recently come across needing to have the choices of a 
django.db.models.Field be dynamic or atleast a callable.  I asked in 
the IRC room, but it turns out choices only accepts a iterable.  While 
an QuerySet is an iterable, it would end up caching the value of the 
returned values.  I don't know if a QuerySet will even work.  In my 
situation I am attempting to pass in a call to a function, but the 
returned value is then cached and won't be reloaded until the model or 
the server is reloaded.

I have found this ticket in Trac:

http://code.djangoproject.com/ticket/1891

I was wondering what everyone's stance is on inclusion of something like this.

-- 
Brian Rosner
http://www.brosner.com/blog



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