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
91c0249c
Commit
91c0249c
authored
Nov 18, 2012
by
Jonas Liljestrand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed migration to support django 1.5
parent
9f378d0d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
rest_framework/authtoken/migrations/0001_initial.py
+2
-1
rest_framework/compat.py
+1
-1
No files found.
rest_framework/authtoken/migrations/0001_initial.py
View file @
91c0249c
...
@@ -3,6 +3,7 @@ import datetime
...
@@ -3,6 +3,7 @@ import datetime
from
south.db
import
db
from
south.db
import
db
from
south.v2
import
SchemaMigration
from
south.v2
import
SchemaMigration
from
django.db
import
models
from
django.db
import
models
from
rest_framework.compat
import
User
class
Migration
(
SchemaMigration
):
class
Migration
(
SchemaMigration
):
...
@@ -11,7 +12,7 @@ class Migration(SchemaMigration):
...
@@ -11,7 +12,7 @@ class Migration(SchemaMigration):
# Adding model 'Token'
# Adding model 'Token'
db
.
create_table
(
'authtoken_token'
,
(
db
.
create_table
(
'authtoken_token'
,
(
(
'key'
,
self
.
gf
(
'django.db.models.fields.CharField'
)(
max_length
=
40
,
primary_key
=
True
)),
(
'key'
,
self
.
gf
(
'django.db.models.fields.CharField'
)(
max_length
=
40
,
primary_key
=
True
)),
(
'user'
,
self
.
gf
(
'django.db.models.fields.related.OneToOneField'
)(
related_name
=
'auth_token'
,
unique
=
True
,
to
=
orm
[
'auth.User'
])),
(
'user'
,
self
.
gf
(
'django.db.models.fields.related.OneToOneField'
)(
related_name
=
'auth_token'
,
unique
=
True
,
to
=
orm
[
"
%
s.
%
s"
%
(
User
.
_meta
.
app_label
,
User
.
_meta
.
object_name
)
])),
(
'created'
,
self
.
gf
(
'django.db.models.fields.DateTimeField'
)(
auto_now_add
=
True
,
blank
=
True
)),
(
'created'
,
self
.
gf
(
'django.db.models.fields.DateTimeField'
)(
auto_now_add
=
True
,
blank
=
True
)),
))
))
db
.
send_create_signal
(
'authtoken'
,
[
'Token'
])
db
.
send_create_signal
(
'authtoken'
,
[
'Token'
])
...
...
rest_framework/compat.py
View file @
91c0249c
...
@@ -38,7 +38,7 @@ else:
...
@@ -38,7 +38,7 @@ else:
try
:
try
:
from
django.contrib.auth.models
import
User
from
django.contrib.auth.models
import
User
except
ImportError
:
except
ImportError
:
raise
ImportError
(
'User model is not to be found.'
)
raise
ImportError
(
u"User model is not to be found."
)
# First implementation of Django class-based views did not include head method
# First implementation of Django class-based views did not include head method
...
...
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