Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#18671 closed Uncategorized (invalid)

<form method="post" action="{% url 'django.contrib.auth.views.login' %}">

Reported by: bartek.rychlicki@… 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

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 Changed 7 years ago by Russell Keith-Magee

Resolution: invalid
Status: newclosed

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.

Last edited 7 years ago by Russell Keith-Magee (previous) (diff)

comment:2 Changed 5 years ago by anonymous

Version: 1.41.5
Note: See TracTickets for help on using tickets.
Back to Top