Re: choices being a QuerySet or callable

2007-07-23 Thread oggie rob
> I was wondering what everyone's stance is on inclusion of something like this. It is not really needed, you can override the field. Take a look at the __init__ call in http://www.djangosnippets.org/snippets/26/ and you can do that with a model field as well as a form field. Yes it is a bit of a

choices being a QuerySet or callable

2007-07-23 Thread Brian Rosner
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'