#3578: newforms EmailField takes the wrong max_length when rendered as html and
a
CharField exists.
-----------------------------------------------------+----------------------
Reporter: Georgi Stanojevski <glisha gmail com> | Owner:
alagu
Status: new | Component:
django.newforms
Version: SVN | Resolution:
Keywords: | Stage:
Accepted
Has_patch: 1 | Needs_docs: 0
Needs_tests: 1 | Needs_better_patch: 1
-----------------------------------------------------+----------------------
Changes (by alagu):
* owner: nobody => alagu
Comment:
Yeah. It WFM. Closing the ticket.
{{{
>>> from django import newforms as forms
>>> from django.newforms.widgets import *
>>> attrs1={'class':'aclass'}
>>> class form1(forms.Form):
... field1 =
forms.CharField(widget=TextInput(attrs=attrs1),max_length=30)
...
>>> class form2(forms.Form):
... field2 =
forms.EmailField(widget=TextInput(attrs=attrs1),max_length=10)
...
>>> f2= form2()
>>> f2.as_ul()
u'<li><label for="id_field2">Field2:</label> <input id="id_field2"
type="text" class="aclass" name="field2" maxlength="10" /></li>'
>>> f2=form2({'field2':'[EMAIL PROTECTED]'})
>>> f2.is_valid()
False
>>> f2.errors
{}
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/3578#comment:6>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---