Ticket #6897: newstyledocs.diff

File newstyledocs.diff, 1.2 KB (added by Brodie Rao, 17 years ago)

Old-style/new-style updates in the docs

  • docs/authentication.txt

     
    10561056The  ``authenticate`` method takes credentials as keyword arguments. Most of
    10571057the time, it'll just look like this::
    10581058
    1059     class MyBackend:
     1059    class MyBackend(object):
    10601060        def authenticate(self, username=None, password=None):
    10611061            # Check the username/password and return a User.
    10621062
    10631063But it could also authenticate a token, like so::
    10641064
    1065     class MyBackend:
     1065    class MyBackend(object):
    10661066        def authenticate(self, token=None):
    10671067            # Check the token and return a User.
    10681068
     
    10841084    from django.conf import settings
    10851085    from django.contrib.auth.models import User, check_password
    10861086
    1087     class SettingsBackend:
     1087    class SettingsBackend(object):
    10881088        """
    10891089        Authenticate against the settings ADMIN_LOGIN and ADMIN_PASSWORD.
    10901090
     
    11331133The simple backend above could implement permissions for the magic admin fairly
    11341134simply::
    11351135
    1136     class SettingsBackend:
     1136    class SettingsBackend(object):
    11371137
    11381138        # ...
    11391139
Back to Top