On Tue, 2006-10-03 at 12:12 +1000, Malcolm Tredinnick wrote: [...] > > In order to have a limit_choices_to that is only evaluated at runtime, > which is probably closer to what you want, you need to do something > similar to models.LazyDate() in Django -- which is the example given in > the docs for the limit_choices_to attribute. That is, you need to create > an object that at the time it is needed to be used in a query, it will > return the list you want. This means, making the __str__ method compute > the value when it is called. See django/db/models/__init__.py (the > LazyDate class) for an example.
Scrub this suggestion. Andy Dustman's solution is the "natural" way to do this. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---