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
900c4b62
Commit
900c4b62
authored
Oct 10, 2012
by
Tom Christie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
api_key -> auth_token to avoid TastyPie conflict
parent
44281c39
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
rest_framework/authtoken/migrations/0001_initial.py
+2
-2
rest_framework/authtoken/models.py
+1
-1
No files found.
rest_framework/authtoken/migrations/0001_initial.py
View file @
900c4b62
...
@@ -11,7 +11,7 @@ class Migration(SchemaMigration):
...
@@ -11,7 +11,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
=
'a
pi_key
'
,
unique
=
True
,
to
=
orm
[
'auth.User'
])),
(
'user'
,
self
.
gf
(
'django.db.models.fields.related.OneToOneField'
)(
related_name
=
'a
uth_token
'
,
unique
=
True
,
to
=
orm
[
'auth.User'
])),
(
'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'
])
...
@@ -56,7 +56,7 @@ class Migration(SchemaMigration):
...
@@ -56,7 +56,7 @@ class Migration(SchemaMigration):
'Meta'
:
{
'object_name'
:
'Token'
},
'Meta'
:
{
'object_name'
:
'Token'
},
'created'
:
(
'django.db.models.fields.DateTimeField'
,
[],
{
'auto_now_add'
:
'True'
,
'blank'
:
'True'
}),
'created'
:
(
'django.db.models.fields.DateTimeField'
,
[],
{
'auto_now_add'
:
'True'
,
'blank'
:
'True'
}),
'key'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'40'
,
'primary_key'
:
'True'
}),
'key'
:
(
'django.db.models.fields.CharField'
,
[],
{
'max_length'
:
'40'
,
'primary_key'
:
'True'
}),
'user'
:
(
'django.db.models.fields.related.OneToOneField'
,
[],
{
'related_name'
:
"'a
pi_key
'"
,
'unique'
:
'True'
,
'to'
:
"orm['auth.User']"
})
'user'
:
(
'django.db.models.fields.related.OneToOneField'
,
[],
{
'related_name'
:
"'a
uth_token
'"
,
'unique'
:
'True'
,
'to'
:
"orm['auth.User']"
})
},
},
'contenttypes.contenttype'
:
{
'contenttypes.contenttype'
:
{
'Meta'
:
{
'ordering'
:
"('name',)"
,
'unique_together'
:
"(('app_label', 'model'),)"
,
'object_name'
:
'ContentType'
,
'db_table'
:
"'django_content_type'"
},
'Meta'
:
{
'ordering'
:
"('name',)"
,
'unique_together'
:
"(('app_label', 'model'),)"
,
'object_name'
:
'ContentType'
,
'db_table'
:
"'django_content_type'"
},
...
...
rest_framework/authtoken/models.py
View file @
900c4b62
...
@@ -9,7 +9,7 @@ class Token(models.Model):
...
@@ -9,7 +9,7 @@ class Token(models.Model):
The default authorization token model.
The default authorization token model.
"""
"""
key
=
models
.
CharField
(
max_length
=
40
,
primary_key
=
True
)
key
=
models
.
CharField
(
max_length
=
40
,
primary_key
=
True
)
user
=
models
.
OneToOneField
(
'auth.User'
,
related_name
=
'a
pi_key
'
)
user
=
models
.
OneToOneField
(
'auth.User'
,
related_name
=
'a
uth_token
'
)
created
=
models
.
DateTimeField
(
auto_now_add
=
True
)
created
=
models
.
DateTimeField
(
auto_now_add
=
True
)
def
save
(
self
,
*
args
,
**
kwargs
):
def
save
(
self
,
*
args
,
**
kwargs
):
...
...
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