Ticket #5342: new_emailfield.diff

File new_emailfield.diff, 981 bytes (added by donspaulding, 7 years ago)

Added the similarly easy documentation change.

  • django/db/models/fields/__init__.py

     
    680680
    681681class EmailField(CharField):
    682682    def __init__(self, *args, **kwargs):
    683         kwargs['max_length'] = 75
     683        if 'max_length' not in kwargs:
     684            kwargs['max_length'] = 75
    684685        CharField.__init__(self, *args, **kwargs)
    685686
    686687    def get_internal_type(self):
  • docs/model-api.txt

     
    221221~~~~~~~~~~~~~~
    222222
    223223A ``CharField`` that checks that the value is a valid e-mail address.
    224 This doesn't accept ``max_length``; its ``max_length`` is automatically set to
    225 75.
     224If ``max_length`` isn't specified, it is automatically set to 75.
    226225
    227226``FileField``
    228227~~~~~~~~~~~~~
Back to Top