diff options
| author | Alex Gaynor <alex.gaynor@gmail.com> | 2011-09-21 21:19:18 +0000 |
|---|---|---|
| committer | Alex Gaynor <alex.gaynor@gmail.com> | 2011-09-21 21:19:18 +0000 |
| commit | e6088dce980d0032267b696fc8f725073a48965c (patch) | |
| tree | 71f28182b4c8ebfcb215a55367ba5ba3988b9a7f | |
| parent | 8f750bf6e57b731a4cc8c710481c16bc95ee1291 (diff) | |
Switch a few examples in the docs to use newstyle classes.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16865 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | docs/topics/auth.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/topics/auth.txt b/docs/topics/auth.txt index 3c7ad36f68..ed47b24abc 100644 --- a/docs/topics/auth.txt +++ b/docs/topics/auth.txt @@ -1637,13 +1637,13 @@ database ID or whatever -- and returns a ``User`` object. The ``authenticate`` method takes credentials as keyword arguments. Most of the time, it'll just look like this:: - class MyBackend: + class MyBackend(object): def authenticate(self, username=None, password=None): # Check the username/password and return a User. But it could also authenticate a token, like so:: - class MyBackend: + class MyBackend(object): def authenticate(self, token=None): # Check the token and return a User. @@ -1665,7 +1665,7 @@ object the first time a user authenticates:: from django.conf import settings from django.contrib.auth.models import User, check_password - class SettingsBackend: + class SettingsBackend(object): """ Authenticate against the settings ADMIN_LOGIN and ADMIN_PASSWORD. @@ -1719,7 +1719,7 @@ any one backend grants. The simple backend above could implement permissions for the magic admin fairly simply:: - class SettingsBackend: + class SettingsBackend(object): # ... |
