File tree Expand file tree Collapse file tree 2 files changed +10
-76
lines changed
accounts/templates/registration Expand file tree Collapse file tree 2 files changed +10
-76
lines changed Original file line number Diff line number Diff line change 1
1
{% extends "base.html" %}
2
+ {% load django_bootstrap5 %}
3
+ {% bootstrap_css %}
4
+ {% bootstrap_javascript %}
2
5
3
6
{% block content %}
4
7
< h1 class ="display-6 "> Login</ h1 >
5
- {% if form.errors %}
6
- < div class ="note note-danger mb-3 ">
7
- < ul >
8
- {% for field in form %}
9
- {% for error in field.errors %}
10
- < li > {% if field != '__all__' %}
11
- < strong > {{ field.label }}</ strong >
12
- {% endif %}
13
- {{ error }}
14
- </ li >
15
- {% endfor %}
16
- {% endfor %}
17
- </ ul >
18
- < p > User error! Try again or contact Admin.</ p >
19
- </ div >
20
- {% endif %}
21
-
22
8
< form method ="post " action ="{% url 'login' %} ">
23
9
{% csrf_token %}
24
- < table class ="table ">
25
- < tr >
26
- < td class ="col "> {{ form.username.label_tag }}</ td >
27
- < td class ="col "> {{ form.username }}</ td >
28
- </ tr >
29
- < tr >
30
- < td class ="col "> {{ form.password.label_tag }}</ td >
31
- < td class ="col "> {{ form.password }}</ td >
32
- </ tr >
33
- < tr >
34
- < td >
35
- < input type ="submit " value ="login " class ="btn btn-success ">
36
- </ td >
37
-
38
- </ tr >
39
- </ table >
40
-
10
+ {% bootstrap_form form %}
11
+ < input type ="submit " value ="login " class ="btn btn-success ">
41
12
< input type ="hidden " name ="next " value ="{{ next }} ">
42
13
</ form >
43
14
Original file line number Diff line number Diff line change 1
1
{% extends "base.html" %}
2
+ {% load django_bootstrap5 %}
3
+ {% bootstrap_css %}
4
+ {% bootstrap_javascript %}
2
5
3
6
{% block content %}
4
7
< h3 > Sign up</ h3 >
5
- {% if form.errors %}
6
- < div class ="note note-danger mb-3 ">
7
- < ul >
8
- {% for field in form %}
9
- {% for error in field.errors %}
10
- < li > {% if field != '__all__' %}
11
- < strong > {{ field.label }}</ strong >
12
- {% endif %}
13
- {{ error }}
14
- </ li >
15
- {% endfor %}
16
- {% endfor %}
17
- </ ul >
18
- < p > User error! Try again or contact Admin.</ p >
19
- </ div >
20
- {% endif %}
8
+
21
9
< form action ="{% url 'signup' %} " method ="POST ">
22
10
{% csrf_token %}
23
- < table class ="table ">
24
- < tr >
25
- < td class ="col "> {{ form.username.label_tag }}</ td >
26
- < td class ="col "> {{ form.username }}</ td >
27
- </ tr >
28
- < tr >
29
- < td class ="col "> {{ form.first_name.label_tag}}</ td >
30
- < td class ="col "> {{ form.first_name }}</ td >
31
- </ tr >
32
- < tr >
33
- < td class ="col "> {{ form.last_name.label_tag}}</ td >
34
- < td class ="col "> {{ form.last_name }}</ td >
35
- </ tr >
36
- < tr >
37
- < td class ="col "> {{ form.email.label_tag}}</ td >
38
- < td class ="col "> {{ form.email }}</ td >
39
- </ tr >
40
- < tr >
41
- < td class ="col "> {{ form.password1.label_tag }}</ td >
42
- < td class ="col "> {{ form.password1 }}</ td >
43
- </ tr >
44
- < tr >
45
- < td class ="col "> {{ form.password2.label_tag }}</ td >
46
- < td class ="col "> {{ form.password2 }}</ td >
47
- </ tr >
48
- </ table >
11
+ {% bootstrap_form form %}
49
12
< input type ="submit " value ="SignUp " class ="btn btn-success ">
50
13
</ form >
51
14
You can’t perform that action at this time.
0 commit comments