1
0
mirror of https://github.com/django/django.git synced 2025-07-05 02:09:13 +00:00

multi-auth: Fixed broken ReST formatting.

git-svn-id: http://code.djangoproject.com/svn/django/branches/multi-auth@2926 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Joseph Kocherhans 2006-05-16 21:18:37 +00:00
parent 63df9c1da6
commit d659956cf5

View File

@ -668,10 +668,10 @@ authenticates against a username and password variable defined in your
``settings.py`` file and creates a Django user object the first time they ``settings.py`` file and creates a Django user object the first time they
authenticate:: authenticate::
from django.conf import settings from django.conf import settings
from django.contrib.auth.models import User, check_password from django.contrib.auth.models import User, check_password
class SettingsBackend: class SettingsBackend:
""" """
Authenticate against vars in settings.py Use the login name, and a hash Authenticate against vars in settings.py Use the login name, and a hash
of the password. For example: of the password. For example:
@ -700,5 +700,3 @@ class SettingsBackend:
return User.objects.get(pk=user_id) return User.objects.get(pk=user_id)
except User.DoesNotExist: except User.DoesNotExist:
return None return None
.. _django.contrib.auth.backends.SettingsBackend: http://code.djangoproject.com/browser/django/branches/magic-removal/django/contrib/auth/backends.py