mirror of
https://github.com/Hopiu/django.git
synced 2026-04-26 01:34:48 +00:00
`action="."` strips query parameters from the URL which is not usually what you want. Copy-paste coding of these examples could lead to difficult to track down bugs or even data loss if the query parameter was meant to alter the scope of a form's POST request.
17 lines
530 B
HTML
17 lines
530 B
HTML
{% extends "base.html" %}
|
|
{% block title %}Login{% endblock %}
|
|
{% block content %}
|
|
{% if form.has_errors %}
|
|
<p>Your username and password didn't match. Please try again.</p>
|
|
{% endif %}
|
|
|
|
<form method="post" action="">
|
|
<table>
|
|
<tr><td><label for="id_username">Username:</label></td><td>{{ form.username }}</td></tr>
|
|
<tr><td><label for="id_password">Password:</label></td><td>{{ form.password }}</td></tr>
|
|
</table>
|
|
|
|
<input type="submit" value="login" />
|
|
<input type="hidden" name="next" value="{{ next }}" />
|
|
</form>
|
|
{% endblock %}
|