style django forms with crisp

Solutions on MaxInterview for style django forms with crisp by the best coders in the world

showing results for - "style django forms with crisp"
Grégoire
04 Oct 2016
1{% extends 'base.html' %}
2
3{% load crispy_forms_tags %}
4
5{% block content %}
6  <form method="post">
7    {% csrf_token %}
8    <div class="form-row">
9      <div class="form-group col-md-6 mb-0">
10        {{ form.email|as_crispy_field }}
11      </div>
12      <div class="form-group col-md-6 mb-0">
13        {{ form.password|as_crispy_field }}
14      </div>
15    </div>
16    {{ form.address_1|as_crispy_field }}
17    {{ form.address_2|as_crispy_field }}
18    <div class="form-row">
19      <div class="form-group col-md-6 mb-0">
20        {{ form.city|as_crispy_field }}
21      </div>
22      <div class="form-group col-md-4 mb-0">
23        {{ form.state|as_crispy_field }}
24      </div>
25      <div class="form-group col-md-2 mb-0">
26        {{ form.zip_code|as_crispy_field }}
27      </div>
28    </div>
29    {{ form.check_me_out|as_crispy_field }}
30    <button type="submit" class="btn btn-primary">Sign in</button>
31  </form>
32{% endblock %}
Emmanuel
17 Aug 2020
1{% extends 'base.html' %}
2
3{% load crispy_forms_tags %}
4
5{% block content %}
6  <form method="post">
7    {% csrf_token %}
8    {{ form|crispy }}
9    <button type="submit" class="btn btn-primary">Sign in</button>
10  </form>
11{% endblock %}