Commits

Florian Apolloner committed 5b19fa2

Fixed #59 -- Use named urls for LOGIN_URL and LOGOUT_URL.

Comments (0)

Files changed (2)

docs/frontend_login.rst

 .. doctest::
     :hide:
 
-    >>> settings.LOGIN_URL == '/login/'
+    >>> settings.LOGIN_URL == 'mysite_login'
     True
-    >>> settings.LOGOUT_URL == '/logout/'
+    >>> settings.LOGOUT_URL == 'mysite_logout'
     True
     >>> settings.LOGIN_REDIRECT_URL == '/'
     True
 These constants configure the automatic redirect after the login and the
 logout. For example if a user who is not authenticated wants to access a
 protected page, she'll be automatically redirected to ``/login/`` where
-she can log in.
+she can log in. The constants should either be URLs relative to the
+current domain like shown for ``LOGIN_REDIRECT_URL`` or simple strings
+which match a named URL pattern from the URLConf.
 
 URLConf
 -------

src/mysite/mysite/settings.py

     }
 }
 
-LOGIN_URL = '/login/'
-LOGOUT_URL = '/logout/'
+LOGIN_URL = 'mysite_login'
+LOGOUT_URL = 'mysite_logout'
 LOGIN_REDIRECT_URL = '/'