djangosnippets.org: Latest snippets tagged with 'required'https://djangosnippets.org/tags/required/2009-03-24T13:14:49.820590-05:00RequiredNullBooleanField
2009-03-24T13:14:49.820590-05:00wwu.housinghttps://djangosnippets.org/snippets/1393/<p>In our situation, we want the user to choose either yes or no. The only requirement is that they fill out the form. It is <em>not</em> required that they answer True/Yes.</p>
<p>The BooleanField treats None and False as False; The NullBooleanField distinguishes between None and False, but it doesn't raise …</p>
Freely redistributablemark a required field by "*" in a template
2007-11-20T08:41:24.163059-06:00brunobordhttps://djangosnippets.org/snippets/474/<p>the trick resides in <code>field.field.required</code>. The intuitive way of testing this in the templates is to access <code>field.required</code>. But it's not the good one. Enjoy!</p>
<p><a href="http://groups.google.com/group/django-users/browse_thread/thread/ce83f74fb1156b4b/0df36947de16a071?lnk=gst&q=required+field#0df36947de16a071">Found via Django users Google Groups</a></p>
Freely redistributable