Created
September 18, 2009 19:56
-
-
Save whatcould/189257 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="primary_fields"> | |
{{ form.list }} | |
{{ form.name }} | |
{{ form.description }} | |
{{ form.url }} | |
</div> | |
# etc | |
And each of the form.fieldname lines (whatever the markup would be) would be doing something like this, but maybe with real code instead of the template language: | |
{% if not field.is_hidden %} | |
<tr> | |
<td class="label">{{ field.label_tag }}</td> | |
<td class="form-field"> | |
{% ifequal field.field.widget.input_type "text" %}<div class="field_wrap">{{ field }}</div> | |
{% else %} | |
{% ifequal field.field.widget.input_type "password" %}<div class="field_wrap">{{ field }}</div> | |
{% else %} | |
{% if field.field.widget.attrs.cols %}<div class="field_wrap">{{ field }}</div> | |
{% else %} | |
{{ field }} | |
{% endif %}{% endifequal %}{% endifequal %} | |
{{ field.errors }} | |
{% if field.help_text %}<p class="help">{{ field.help_text|safe }}</p>{% endif %} | |
</td> | |
</tr> | |
{% else %} | |
{{ field }} | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment