summaryrefslogtreecommitdiff
path: root/django/contrib/admin/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/contrib/admin/utils.py')
-rw-r--r--django/contrib/admin/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/contrib/admin/utils.py b/django/contrib/admin/utils.py
index baaaa9e43f..42d0d96ea6 100644
--- a/django/contrib/admin/utils.py
+++ b/django/contrib/admin/utils.py
@@ -51,13 +51,13 @@ def lookup_spawns_duplicates(opts, lookup_path):
return False
-def prepare_lookup_value(key, value):
+def prepare_lookup_value(key, value, separator=','):
"""
Return a lookup value prepared to be used in queryset filtering.
"""
# if key ends with __in, split parameter into separate values
if key.endswith('__in'):
- value = value.split(',')
+ value = value.split(separator)
# if key ends with __isnull, special case '' and the string literals 'false' and '0'
elif key.endswith('__isnull'):
value = value.lower() not in ('', 'false', '0')