mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-06 13:23:18 +03:00
Merge pull request #1883 from jpadilla/master
Update authtoken latest Django 1.7 migration
This commit is contained in:
commit
543c6c8e35
|
@ -1,4 +1,4 @@
|
||||||
# encoding: utf8
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import models, migrations
|
||||||
|
@ -15,12 +15,11 @@ class Migration(migrations.Migration):
|
||||||
migrations.CreateModel(
|
migrations.CreateModel(
|
||||||
name='Token',
|
name='Token',
|
||||||
fields=[
|
fields=[
|
||||||
('key', models.CharField(max_length=40, serialize=False, primary_key=True)),
|
('key', models.CharField(primary_key=True, serialize=False, max_length=40)),
|
||||||
('user', models.OneToOneField(to=settings.AUTH_USER_MODEL, to_field='id')),
|
|
||||||
('created', models.DateTimeField(auto_now_add=True)),
|
('created', models.DateTimeField(auto_now_add=True)),
|
||||||
|
('user', models.OneToOneField(to=settings.AUTH_USER_MODEL, related_name='auth_token')),
|
||||||
],
|
],
|
||||||
options={
|
options={
|
||||||
'abstract': False,
|
|
||||||
},
|
},
|
||||||
bases=(models.Model,),
|
bases=(models.Model,),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user