Re: Ticket 2445 - limit_choices_to - allow callable(value).

2006-07-28 Thread Michael Hamilton
I've raised Ticket 2445 and attached a small patch - it sounds similar to Ticket 2193, but 2193 might be intended to be even more general (not just values). http://code.djangoproject.com/ticket/2445 http://code.djangoproject.com/ticket/2193 --~--~-~--~~~---~--~---

Re: limit_choices_to - allow FunctionType values?

2006-07-27 Thread Michael Hamilton
On Friday 28 July 2006 04:24, Simon Willison wrote: > > ... > > I've tested such a change on Django 0.95 - it seems to work OK. > > A neater way of doing that is to use the built-inr Python function > callable(): > > if callable(value): > value = value() > > This seems like a neat addition to