mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #2101 -- Renamed maxlength argument to max_length for oldforms FormFields and db model Fields. This is fully backwards compatible at the moment since the legacy maxlength argument is still supported. Using maxlength will, however, issue a PendingDeprecationWarning when used.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5803 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -81,7 +81,7 @@ class FlexibleFieldLookupDict:
|
||||
import re
|
||||
m = re.search(r'^\s*(?:var)?char\s*\(\s*(\d+)\s*\)\s*$', key)
|
||||
if m:
|
||||
return ('CharField', {'maxlength': int(m.group(1))})
|
||||
return ('CharField', {'max_length': int(m.group(1))})
|
||||
raise KeyError
|
||||
|
||||
DATA_TYPES_REVERSE = FlexibleFieldLookupDict()
|
||||
|
||||
Reference in New Issue
Block a user