diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-03-29 18:39:21 +0000 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-03-29 18:39:21 +0000 |
| commit | 31e84e40f8e4c5e6d4fb4bd9276d2e535545fa33 (patch) | |
| tree | 1c99aec1404e7343889fba16584fbd0b80ca6e56 /django | |
| parent | 159d1be6567a3696468b77c64169f4f5a5429c14 (diff) | |
Fixed #17870 -- Documented that EmailField default max_length of 75 does not comply with RFCs 3696/5321. Thanks Rotund for the report and the patch and Russell Keith-Magee for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17826 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/models/fields/__init__.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py index 22546c27de..23be549224 100644 --- a/django/db/models/fields/__init__.py +++ b/django/db/models/fields/__init__.py @@ -890,6 +890,9 @@ class EmailField(CharField): description = _("E-mail address") def __init__(self, *args, **kwargs): + # max_length should be overridden to 254 characters to be fully + # compliant with RFCs 3696 and 5321 + kwargs['max_length'] = kwargs.get('max_length', 75) CharField.__init__(self, *args, **kwargs) |
