#5136: newforms field required attribute is not evaluated in templates
-----------------------------------+----------------------------------------
Reporter:  [EMAIL PROTECTED]  |       Owner:  adrian                            
  Status:  new                     |   Component:  django.newforms              
     
 Version:  SVN                     |    Keywords:  field required template 
evaluation
   Stage:  Unreviewed              |   Has_patch:  0                            
     
-----------------------------------+----------------------------------------
 I'm using newforms form object as following:
 {{{
 from django import newforms as forms
 
 class ModifyForm(forms.Form):
     email = forms.EmailField(required=True, label=u'E-Mail')
     homepage = forms.URLField(required=False, label=u'홈페이지')
     signature = forms.CharField(widget=forms.Textarea, required=False,
 label=u'서명', help_text=u'자신이 올린 자료나 글의 끝에 따라붙는 텍스트입니다.')
 }}}
 {{{
             <form id="form-ModifyUser" method="post"
 action="/user/modify/">
             <table>
                 <tr><th>OpenID:</th><td>{{userprof.openid}}</td></tr>
                 {% for field in modify_form %}
                 <tr>
                     <th>{{field.label_tag}}{% if field.required %}<span
 class="required">*</span>{% endif %}:</th>
                     <td>
                         {% if field.errors %}{{field.errors}}{% endif %}
                         {{field}}
                         {% if field.help_text %}<br/><span
 class="help">{{field.help_text}}</span>{% endif %}
                     </td>
                 </tr>
                 {% endfor %}
             </table>
             <p><input type="submit" value="수정하기" /></p>
             </form>
 }}}
 
 But field.required returns always None, not True or False, so I cannot
 display a required asterisk mark for required fields.
 Other options such as help_text works fine.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/5136>
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