Opened 13 years ago

Closed 13 years ago

#15720 closed (invalid)

typo leading to NoReverseMatch

Reported by: antonovga@… Owned by: nobody
Component: Documentation Version: 1.3
Severity: 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

Hi,
in doc about auth near login_required decorator there is a typo in sample code of login.html template

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

should be

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

p.s.

as for django newbie it's really hard to understand why i should place in template_dirs(settings.py) a path(_full_ path!) to login.html, while it is _in_ "project" directory and should be visible by default(ok i hear about you want to be explicit, but hey, why templates dir is default to templates then?). Without putting it in setting.py auth will throw exception "no template found".
Please point out, that user should write project template directory in the settings.py file.

p.p.s.

It will be great if you write (or place link to if it exist) really simple hello world app with login/logout, showing how it works, not only pieces scattered through doc page. It will save a lot of time for newbies.

Change History (2)

comment:1 by antonovga@…, 13 years ago

about template directory - my mistake, in my case it was created by ide, now I understand why should place it in settings.py.

comment:2 by Karen Tracey, 13 years ago

Resolution: invalid
Status: newclosed

I suspect you are reading the 1.3 doc but using an earlier version of Django. The doc you mention is specifically using a new-with-1.3 feature, see: http://docs.djangoproject.com/en/dev/releases/1.3/#changes-to-url-and-ssi

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