forked from caffeinehit/django-oauth2-provider
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finish updating code for Python3 and Django2 compatibility
- Loading branch information
Showing
8 changed files
with
72 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
Django>=2.1 | ||
shortuuid>=0.4 | ||
six>=0.11.0 | ||
sqlparse>=0.2.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
from django import VERSION as DJANGO_VERSION | ||
|
||
DEBUG = True | ||
TEMPLATE_DEBUG = DEBUG | ||
|
||
ADMINS = ( | ||
('Tester', '[email protected]'), | ||
|
@@ -61,7 +60,23 @@ | |
'provider.oauth2', | ||
) | ||
|
||
MIDDLEWARE_CLASSES = ( | ||
TEMPLATES = [ | ||
{ | ||
'BACKEND': 'django.template.backends.django.DjangoTemplates', | ||
'DIRS': [], | ||
'APP_DIRS': True, | ||
'OPTIONS': { | ||
'context_processors': [ | ||
# 'django.template.context_processors.debug', | ||
# 'django.template.context_processors.request', | ||
'django.contrib.auth.context_processors.auth', | ||
# 'django.contrib.messages.context_processors.messages', | ||
], | ||
}, | ||
}, | ||
] | ||
|
||
MIDDLEWARE = ( | ||
'django.contrib.sessions.middleware.SessionMiddleware', | ||
'django.middleware.common.CommonMiddleware', | ||
'django.middleware.csrf.CsrfViewMiddleware', | ||
|
@@ -70,6 +85,13 @@ | |
'django.middleware.clickjacking.XFrameOptionsMiddleware', | ||
) | ||
|
||
PASSWORD_HASHERS = [ | ||
'django.contrib.auth.hashers.PBKDF2PasswordHasher', | ||
'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher', | ||
'django.contrib.auth.hashers.BCryptSHA256PasswordHasher', | ||
'django.contrib.auth.hashers.SHA1PasswordHasher', # Used by unit tests | ||
] | ||
|
||
# Use DiscoverRunner on Django 1.7 and above | ||
if DJANGO_VERSION[0] == 1 and DJANGO_VERSION[1] >= 7: | ||
TEST_RUNNER = 'django.test.runner.DiscoverRunner' | ||
|