Last active
December 10, 2015 14:08
-
-
Save WBarton/4445204 to your computer and use it in GitHub Desktop.
Rough markup to render an easy to customise select tag from a Django form.
This file contains hidden or 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
<select name="{{ field.auto_id }}" id="{{ field.auto_id }}"> | |
{% for choice in form.my_choice_field.field.choices %} | |
<option value="{{ choice.0 }}">{{ choice.1 }}</option> | |
{% endfor %} | |
</select> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment