On 7/13/06, Kilian CAVALOTTI <[EMAIL PROTECTED]> wrote:
Unfortunately, no. There is not currently a way to put custom SQL in limit_choices_to.
The idea (allowing an extra() clause on the Q objects so that you can have extra customization in limit_choices_to) is reasonable enough, so it's probably worth lodging this as an enhancement request, so the idea isn't lost. However, I wouldn't bet on this being implemented any time soon (unless your itch gets the better of you, and you try your own hand at a fix).
Otherwise, you're out of luck. Sorry :-(
Russ Magee %-)
Argh, bad news. Actually I asked the question because I'd like to use custom
SQL in a 'limit_choices_to' option, in the admin interface. I can't figure
how to proceed, since this option only takes a dictionary of lookup
arguments, or Q objects. So I guess there's no way to use custom SQL
in 'limit_choices_to', is it?
Unfortunately, no. There is not currently a way to put custom SQL in limit_choices_to.
The idea (allowing an extra() clause on the Q objects so that you can have extra customization in limit_choices_to) is reasonable enough, so it's probably worth lodging this as an enhancement request, so the idea isn't lost. However, I wouldn't bet on this being implemented any time soon (unless your itch gets the better of you, and you try your own hand at a fix).
Otherwise, you're out of luck. Sorry :-(
Russ Magee %-)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---