#3578: newforms EmailField takes the wrong max_length when rendered as html and 
a
CharField exists.
-----------------------------------------------------+----------------------
   Reporter:  Georgi Stanojevski <glisha gmail com>  |                Owner:  
adrian         
     Status:  new                                    |            Component:  
django.newforms
    Version:  SVN                                    |           Resolution:    
             
   Keywords:                                         |                Stage:  
Accepted       
  Has_patch:  1                                      |           Needs_docs:  0 
             
Needs_tests:  1                                      |   Needs_better_patch:  1 
             
-----------------------------------------------------+----------------------
Comment (by Collin Grady <[EMAIL PROTECTED]>):

 Could this have been fixed already in some past changes to
 !RegexField/URLField/!EmailField ? I tried duplicating it just now and
 can't do it
 
 {{{
 >>> from django import newforms as forms
 >>>
 >>> attrs1={'class':'aclass'}
 >>>
 >>> class form1(forms.Form):
 ...     field1 =
 forms.CharField(widget=forms.TextInput(attrs=attrs1),max_length=30)
 ...
 >>> class form2(forms.Form):
 ...     field2 =
 forms.EmailField(widget=forms.TextInput(attrs=attrs1),max_length=10)
 ...
 >>> f = form2()
 >>> f.as_ul()
 u'<li><label for="id_field2">Field2:</label> <input id="id_field2"
 type="text" class="aclass" name="field2" maxlength="10" /></li>'
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3578#comment:5>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to