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
bbb5a8a1
Commit
bbb5a8a1
authored
Nov 17, 2012
by
Jonas Liljestrand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed import error
parent
3c1b5c34
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
rest_framework/authtoken/models.py
+7
-7
No files found.
rest_framework/authtoken/models.py
View file @
bbb5a8a1
...
...
@@ -4,18 +4,18 @@ from hashlib import sha1
from
django.db
import
models
from
django
import
VERSION
try
:
from
django.db.models.auth
import
User
user_model
=
User
except
ImportError
:
raise
ImportError
else
:
raise
if
VERSION
[:
2
]
in
((
1
,
5
,),):
from
django.conf
import
settings
if
hasattr
(
settings
,
AUTH_USER_MODEL
):
user_model
=
settings
.
AUTH_USER_MODEL
else
:
from
django.contrib.auth.models
import
User
as
user_model
else
:
try
:
from
django.db.models.auth
import
User
as
user_model
except
ImportError
:
raise
ImportError
(
'User model is not to be found.'
)
class
Token
(
models
.
Model
):
...
...
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