Fixed #5342 -- Added max_length parameter to EmailField. Thanks, donspaulding and gwilson
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6205 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
fe78237a22
commit
0d52d2b2f9
|
@ -686,7 +686,8 @@ class DecimalField(Field):
|
|||
|
||||
class EmailField(CharField):
|
||||
def __init__(self, *args, **kwargs):
|
||||
kwargs['max_length'] = 75
|
||||
if 'max_length' not in kwargs:
|
||||
kwargs['max_length'] = 75
|
||||
CharField.__init__(self, *args, **kwargs)
|
||||
|
||||
def get_internal_type(self):
|
||||
|
|
|
@ -221,8 +221,10 @@ The admin represents this as an ``<input type="text">`` (a single-line input).
|
|||
~~~~~~~~~~~~~~
|
||||
|
||||
A ``CharField`` that checks that the value is a valid e-mail address.
|
||||
This doesn't accept ``max_length``; its ``max_length`` is automatically set to
|
||||
75.
|
||||
|
||||
In Django 0.96, this doesn't accept ``max_length``; its ``max_length`` is
|
||||
automatically set to 75. In the Django development version, ``max_length`` is
|
||||
set to 75 by default, but you can specify it to override default behavior.
|
||||
|
||||
``FileField``
|
||||
~~~~~~~~~~~~~
|
||||
|
|
Loading…
Reference in New Issue