summaryrefslogtreecommitdiff
path: root/docs/authentication.txt
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2006-06-06 05:16:05 +0000
committerAdrian Holovaty <adrian@holovaty.com>2006-06-06 05:16:05 +0000
commit6dfea737f627cb8c06b8feac0905136c3e55bae6 (patch)
tree380215d9533d93786d542463303667149f1e5c4e /docs/authentication.txt
parentafe55af1e7dc1ff38544c56cc6ddfb18436934d2 (diff)
Made template names in django.contrib.auth.views passable as template_name argument to the view
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3087 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/authentication.txt')
-rw-r--r--docs/authentication.txt11
1 files changed, 9 insertions, 2 deletions
diff --git a/docs/authentication.txt b/docs/authentication.txt
index 804f0326c1..79a4ed0875 100644
--- a/docs/authentication.txt
+++ b/docs/authentication.txt
@@ -347,8 +347,8 @@ Here's what ``django.contrib.auth.views.login`` does::
form.
It's your responsibility to provide the login form in a template called
-``registration/login.html``. This template gets passed three template context
-variables:
+``registration/login.html`` by default. This template gets passed three
+template context variables:
* ``form``: A ``FormWrapper`` object representing the login form. See the
`forms documentation`_ for more on ``FormWrapper`` objects.
@@ -357,6 +357,13 @@ variables:
* ``site_name``: The name of the current ``Site``, according to the
``SITE_ID`` setting. See the `site framework docs`_.
+If you'd prefer not to call the template ``registration/login.html``, you can
+pass the ``template_name`` parameter via the extra arguments to the view in
+your URLconf. For example, this URLconf line would use ``myapp/login.html``
+instead::
+
+ (r'^accounts/login/$', 'django.contrib.auth.views.login', {'template_name': 'myapp/login.html'}),
+
Here's a sample ``registration/login.html`` template you can use as a starting
point. It assumes you have a ``base.html`` template that defines a ``content``
block::