mirror of
https://github.com/django/django.git
synced 2025-09-24 19:23:03 +00:00
Backwards-incompatible change -- Removed LazyDate helper class. To preserve existing functionality, query arguments can now be callable. Callable query arguments are evaluated with the query is evaluated.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4985 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
17fac1b09b
commit
bbeb62c9af
4 changed files with 8 additions and 35 deletions
|
@ -826,7 +826,9 @@ def parse_lookup(kwarg_items, opts):
|
|||
# Interpret '__exact=None' as the sql '= NULL'; otherwise, reject
|
||||
# all uses of None as a query value.
|
||||
if lookup_type != 'exact':
|
||||
raise ValueError, "Cannot use None as a query value"
|
||||
raise ValueError, "Cannot use None as a query value"
|
||||
elif callable(value):
|
||||
value = value()
|
||||
|
||||
joins2, where2, params2 = lookup_inner(path, lookup_type, value, opts, opts.db_table, None)
|
||||
joins.update(joins2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue