Skip to content

Commit c98ab73

Browse files
committed
Call explicit form rendering methods to avoid warnings
1 parent b86a790 commit c98ab73

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

example/templates/registration.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ <h1>{% block title %}{% trans "Registration" %}{% endblock %}</h1>
66

77
<form action="" method="POST">
88
{% csrf_token %}
9-
<table>{{ form }}</table>
9+
<table>{{ form.as_table }}</table>
1010
<button class="btn btn-primary" type="submit">{% trans "Register" %}</button>
1111
</form>
1212
{% endblock %}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<table class="mb-3">
22
{{ wizard.management_form }}
3-
{{ wizard.form }}
3+
{{ wizard.form.as_table }}
44
</table>

two_factor/templates/two_factor/core/backup_tokens.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ <h1>{% block title %}{% trans "Backup Tokens" %}{% endblock %}</h1>
2020
<p>{% trans "You don't have any backup codes yet." %}</p>
2121
{% endif %}
2222

23-
<form method="post">{% csrf_token %}{{ form }}
23+
<form method="post">{% csrf_token %}{{ form.as_p }}
2424
<a href="{% url 'two_factor:profile'%}"
2525
class="float-right btn btn-link">{% trans "Back to Account Security" %}</a>
2626
<button class="btn btn-primary" type="submit">{% trans "Generate Tokens" %}</button>

two_factor/templates/two_factor/profile/disable.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ <h1>{% block title %}{% trans "Disable Two-factor Authentication" %}{% endblock
77
weakens your account security, are you sure?{% endblocktrans %}</p>
88
<form method="post">
99
{% csrf_token %}
10-
<table>{{ form }}</table>
10+
<table>{{ form.as_table }}</table>
1111
<button class="btn btn-danger"
1212
type="submit">{% trans "Disable" %}</button>
1313
</form>

0 commit comments

Comments
 (0)