diff -r c8373c5e600e django/db/models/fields/__init__.py
a
|
b
|
|
890 | 890 | description = _("E-mail address") |
891 | 891 | |
892 | 892 | def __init__(self, *args, **kwargs): |
| 893 | # max_length should be overridden to 254 characters to be fully |
| 894 | # compliant with RFCs 3696 and 5321 |
| 895 | |
893 | 896 | kwargs['max_length'] = kwargs.get('max_length', 75) |
894 | 897 | CharField.__init__(self, *args, **kwargs) |
895 | 898 | |
diff -r c8373c5e600e docs/ref/models/fields.txt
a
|
b
|
|
481 | 481 | |
482 | 482 | A :class:`CharField` that checks that the value is a valid email address. |
483 | 483 | |
| 484 | .. admonition:: Incompliance to RFCs |
| 485 | |
| 486 | The default value of ``max_length`` is not compliant with RFCs 3696 and |
| 487 | 5321. It is suggested that new projects override the ``max_length`` to 254 |
| 488 | characters, as this would be capable of storing all email addresses as |
| 489 | defined by RFCs 3696 and 5321. |
| 490 | |
| 491 | The default value is not being changed at this time to maintain backward |
| 492 | compatibility with previous versions of Django. |
| 493 | |
484 | 494 | ``FileField`` |
485 | 495 | ------------- |
486 | 496 | |