#18671 closed Uncategorized (invalid)
<form method="post" action="{% url 'django.contrib.auth.views.login' %}">
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Documentation | Version: | 1.5 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
https://docs.djangoproject.com/en/dev/topics/auth/#django.contrib.auth.views.login
contains a sample login form which will throw
NoReverseMatch: Reverse for django.contrib.auth.views.login with arguments '()' and keyword arguments '{}' not found.
the code:
<form method="post" action="{% url 'django.contrib.auth.views.login' %}">
should be
<form method="post" action="{% url django.contrib.auth.views.login %}">
which fixes the problem
my django is 1.4
Change History (2)
comment:1 by , 12 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 11 years ago
Version: | 1.4 → 1.5 |
---|
Note:
See TracTickets
for help on using tickets.
You're using the documentation for the development version, but using Django 1.4. If you use the documentation for Django 1.4, you'll see that there is a {% load url from future %} tag required. This is due to a change int he {% url %} tag that we have been phasing in since Django 1.3. See the Django 1.3 release notes for more details.