Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
fc2dee84
Commit
fc2dee84
authored
Dec 16, 2013
by
Tom Christie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't import compat.py from authtoken.models. Closes #1297
parent
69fef838
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
rest_framework/authtoken/models.py
+7
-1
rest_framework/compat.py
+0
-7
No files found.
rest_framework/authtoken/models.py
View file @
fc2dee84
import
uuid
import
uuid
import
hmac
import
hmac
from
hashlib
import
sha1
from
hashlib
import
sha1
from
rest_framework.compat
import
AUTH_USER_MODEL
from
django.conf
import
settings
from
django.conf
import
settings
from
django.db
import
models
from
django.db
import
models
# Prior to Django 1.5, the AUTH_USER_MODEL setting does not exist.
# Note that we don't perform this code in the compat module due to
# bug report #1297
# See: https://github.com/tomchristie/django-rest-framework/issues/1297
AUTH_USER_MODEL
=
getattr
(
settings
,
'AUTH_USER_MODEL'
,
'auth.User'
)
class
Token
(
models
.
Model
):
class
Token
(
models
.
Model
):
"""
"""
The default authorization token model.
The default authorization token model.
...
...
rest_framework/compat.py
View file @
fc2dee84
...
@@ -104,13 +104,6 @@ def get_concrete_model(model_cls):
...
@@ -104,13 +104,6 @@ def get_concrete_model(model_cls):
return
model_cls
return
model_cls
# Django 1.5 add support for custom auth user model
if
django
.
VERSION
>=
(
1
,
5
):
AUTH_USER_MODEL
=
settings
.
AUTH_USER_MODEL
else
:
AUTH_USER_MODEL
=
'auth.User'
if
django
.
VERSION
>=
(
1
,
5
):
if
django
.
VERSION
>=
(
1
,
5
):
from
django.views.generic
import
View
from
django.views.generic
import
View
else
:
else
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment