{% extends "common/base.html" %}
{% load base %}
{% load staticfiles %}
{# HTML template for single-form webpages #}

{% block html_head %}
  <!-- Validation scripts -->
  <script src="{% static 'common/form_validator.js' %}"></script>
  {% for v in validators %}
  <script src="{% static '' %}{{ v }}"></script>
  {% endfor %}
{% endblock %}

{% block html_body %}
  {% open_box %}
    <h2>Create Account</h2>
    <form id="form" class="form-horizontal" role="form">
      {% for f in form %}
      <div class="form-group">
        <label class="col-sm-3 control-label">{{ f.label }}</label>
        <div class="col-sm-8">
          <input
              class="form-control" type="{{ f.type }}" id="{{ f.id }}"
              {% if 'name' in f %} name="{{ f.name }}" {% endif %}
          >
        </div>
      </div>
      {% endfor %}

      <!-- Helpful error message logging -->
      <div class="row"><div class="col-sm-offset-3 col-sm-8">
        <div class="panel panel-default log-panel">
          <div class="panel-heading"></div>
        </div>
      </div></div>

      <!-- Submit button -->
      <button type="submit" class="btn btn-primary pull-right">
        Submit
      </button>
    </form>
  {% close_box %}
{% endblock %}

{% extends "common/base.html" %}
{% load base %}
{% load staticfiles %}
{# HTML template for single-form webpages #}

{% block html_head %}
  <!-- Validation scripts -->
  <script src="{% static 'common/form_validator.js' %}"></script>
  {% for v in validators %}
  <script src="{% static '' %}{{ v }}"></script>
  {% endfor %}
{% endblock %}

{% block html_body %}
  {% open_box %}
    <h2>Create Account</h2>
    <form
        id="form" class="form-horizontal" role="form"
        action="{{action}}" method="post"
    > {% csrf_token %}
      {% for f in form %}
      <div class="form-group">
        <label class="col-sm-3 control-label">{{ f.label }}</label>
        <div class="col-sm-8">
          <input
              class="form-control" type="{{ f.type }}" id="{{ f.id }}"
              {% if 'name' in f %} name="{{ f.name }}" {% endif %}
          >
        </div>
      </div>
      {% endfor %}

      <!-- Helpful error message logging -->
      <div class="row"><div class="col-sm-offset-3 col-sm-8">
        <div class="panel panel-default log-panel">
          <div class="panel-heading"></div>
        </div>
      </div></div>

      <!-- Submit button -->
      <button type="submit" class="btn btn-primary pull-right">
        Submit
      </button>
    </form>
  {% close_box %}
{% endblock %}

Add post action on forms
Add post action on forms
