Created
March 10, 2015 22:16
-
-
Save neuman/4b0e0202cceb9f153f71 to your computer and use it in GitHub Desktop.
djangoform
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
| {% extends "base/theme.html" %} | |
| {% load addattr %} | |
| {% block maincontent %} | |
| <div class="header-buffer"> | |
| </div> | |
| <section id="services"> | |
| <div class="container"> | |
| <div class="row"> | |
| {% if form %} | |
| <div class="col-md-12"> | |
| <form action="" method="post" enctype="multipart/form-data">{% csrf_token %}{{ form.media }} | |
| {% for field in form %} | |
| <div class="form-group warning"> | |
| <label for="exampleInputFile">{{ field.label }}</label> | |
| {{ field|addattr:"form-control"}} | |
| {% if field.help_text %}<p class="help-block">{{ field.help_text }}</p>{% endif %} | |
| </div> | |
| {% if field.errors %} | |
| {% for error in field.errors %} | |
| <div class="alert alert-danger" id="error_{{ field.name }}">{{ error|escape }}</div> | |
| {% endfor %} | |
| {% endif %} | |
| {% endfor %} | |
| <input type="submit" class="btn btn-success" role="button" value="{{ verb|default:"Submit" }}" /> | |
| </form> | |
| </div> | |
| {% endif %} | |
| </div> | |
| </div> | |
| </section> | |
| {% endblock %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment