diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2006-01-15 01:15:44 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2006-01-15 01:15:44 +0000 |
| commit | e260037e168152b17e4f46685ccce301fe3f5c99 (patch) | |
| tree | 68f4e7492c49efdf1a2e5b5e7f2cf36cf23ac476 | |
| parent | 39639cfd22386856e4ee3cc9fe5e75c30bec066b (diff) | |
Fixed #1218 -- Improved model validator to complain for non True/False values for 'db_index' parameter
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1966 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/core/management.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/django/core/management.py b/django/core/management.py index 2082ba1a61..9aff69119a 100644 --- a/django/core/management.py +++ b/django/core/management.py @@ -664,6 +664,8 @@ def get_validation_errors(outfile): for c in f.choices: if not type(c) in (tuple, list) or len(c) != 2: e.add(opts, '"%s" field: "choices" should be a sequence of two-tuples.' % f.name) + if f.db_index not in (None, True, False): + e.add(opts, '"%s" field: "db_index" should be either None, True or False.' % f.name) # Check for multiple ManyToManyFields to the same object, and # verify "singular" is set in that case. |
