mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[1.7.x] Fixed syntax highlighting in docs/topics/auth/default.txt
Backport of 3e132406e3 from master
This commit is contained in:
@@ -313,8 +313,10 @@ You can tell them apart with
|
|||||||
|
|
||||||
if request.user.is_authenticated():
|
if request.user.is_authenticated():
|
||||||
# Do something for authenticated users.
|
# Do something for authenticated users.
|
||||||
|
...
|
||||||
else:
|
else:
|
||||||
# Do something for anonymous users.
|
# Do something for anonymous users.
|
||||||
|
...
|
||||||
|
|
||||||
.. _how-to-log-a-user-in:
|
.. _how-to-log-a-user-in:
|
||||||
|
|
||||||
@@ -351,8 +353,10 @@ If you have an authenticated user you want to attach to the current session
|
|||||||
# Redirect to a success page.
|
# Redirect to a success page.
|
||||||
else:
|
else:
|
||||||
# Return a 'disabled account' error message
|
# Return a 'disabled account' error message
|
||||||
|
...
|
||||||
else:
|
else:
|
||||||
# Return an 'invalid login' error message.
|
# Return an 'invalid login' error message.
|
||||||
|
...
|
||||||
|
|
||||||
.. admonition:: Calling ``authenticate()`` first
|
.. admonition:: Calling ``authenticate()`` first
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user