Skip to content

Commit e6088dc

Browse files
committed
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
1 parent 8f750bf commit e6088dc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/topics/auth.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,13 +1637,13 @@ database ID or whatever -- and returns a ``User`` object.
16371637
The ``authenticate`` method takes credentials as keyword arguments. Most of
16381638
the time, it'll just look like this::
16391639

1640-
class MyBackend:
1640+
class MyBackend(object):
16411641
def authenticate(self, username=None, password=None):
16421642
# Check the username/password and return a User.
16431643

16441644
But it could also authenticate a token, like so::
16451645

1646-
class MyBackend:
1646+
class MyBackend(object):
16471647
def authenticate(self, token=None):
16481648
# Check the token and return a User.
16491649

@@ -1665,7 +1665,7 @@ object the first time a user authenticates::
16651665
from django.conf import settings
16661666
from django.contrib.auth.models import User, check_password
16671667

1668-
class SettingsBackend:
1668+
class SettingsBackend(object):
16691669
"""
16701670
Authenticate against the settings ADMIN_LOGIN and ADMIN_PASSWORD.
16711671

@@ -1719,7 +1719,7 @@ any one backend grants.
17191719
The simple backend above could implement permissions for the magic admin
17201720
fairly simply::
17211721

1722-
class SettingsBackend:
1722+
class SettingsBackend(object):
17231723

17241724
# ...
17251725

0 commit comments

Comments
 (0)