Author: Alex
Date: 2011-09-21 14:19:18 -0700 (Wed, 21 Sep 2011)
New Revision: 16865
Modified:
django/trunk/docs/topics/auth.txt
Log:
Switch a few examples in the docs to use newstyle classes.
Modified: django/trunk/docs/topics/auth.txt
===================================================================
--- django/trunk/docs/topics/auth.txt 2011-09-21 17:25:13 UTC (rev 16864)
+++ django/trunk/docs/topics/auth.txt 2011-09-21 21:19:18 UTC (rev 16865)
@@ -1637,13 +1637,13 @@
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 @@
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 @@
The simple backend above could implement permissions for the magic admin
fairly simply::
- class SettingsBackend:
+ class SettingsBackend(object):
# ...
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.