summaryrefslogtreecommitdiff
path: root/django/db/models/options.py
diff options
context:
space:
mode:
authorLuke Plant <L.Plant.98@cantab.net>2011-01-28 14:08:25 +0000
committerLuke Plant <L.Plant.98@cantab.net>2011-01-28 14:08:25 +0000
commitc24bdf044ba23f2aa09ea4637a368ea86fd1c128 (patch)
tree9e9afcb8dc6803205570e5e047539537528b9ea8 /django/db/models/options.py
parent22eaf77f9d3541e007d3e1b6292710bb6a016dff (diff)
Fixed #15103 - SuspiciousOperation with limit_choices_to and raw_id_fields
Thanks to natrius for the report. This patch also fixes some unicode bugs in affected code. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15347 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/models/options.py')
-rw-r--r--django/db/models/options.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/django/db/models/options.py b/django/db/models/options.py
index 882d2f5709..2f64c56b00 100644
--- a/django/db/models/options.py
+++ b/django/db/models/options.py
@@ -55,6 +55,10 @@ class Options(object):
self.abstract_managers = []
self.concrete_managers = []
+ # List of all lookups defined in ForeignKey 'limit_choices_to' options
+ # from *other* models. Needed for some admin checks. Internal use only.
+ self.related_fkey_lookups = []
+
def contribute_to_class(self, cls, name):
from django.db import connection
from django.db.backends.util import truncate_name