Skip to content

Commit 621574c

Browse files
sdwoodburyauvipy
authored andcommitted
Update tutorial_03.rst
`AUTHENTICATION_BACKENDS` and `MIDDLEWARE` should be arrays, not tuples. Using tuples seems to work, but everything else in the settings.py file is an array.
1 parent 0658109 commit 621574c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/tutorial/tutorial_03.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ which takes care of token verification. In your settings.py:
1515

1616
.. code-block:: python
1717
18-
AUTHENTICATION_BACKENDS = (
18+
AUTHENTICATION_BACKENDS = [
1919
'oauth2_provider.backends.OAuth2Backend',
2020
# Uncomment following if you want to access the admin
21-
#'django.contrib.auth.backends.ModelBackend'
21+
#'django.contrib.auth.backends.ModelBackend',
2222
'...',
23-
)
23+
]
2424
25-
MIDDLEWARE = (
25+
MIDDLEWARE = [
2626
'...',
2727
# If you use SessionAuthenticationMiddleware, be sure it appears before OAuth2TokenMiddleware.
2828
# SessionAuthenticationMiddleware is NOT required for using django-oauth-toolkit.
2929
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
3030
'oauth2_provider.middleware.OAuth2TokenMiddleware',
3131
'...',
32-
)
32+
]
3333
3434
You will likely use the `django.contrib.auth.backends.ModelBackend` along with the OAuth2 backend
3535
(or you might not be able to log in into the admin), only pay attention to the order in which

0 commit comments

Comments
 (0)