django-rest-framework/rest_framework/authtoken/migrations/0001_initial.py

27 lines
723 B
Python
Raw Normal View History

2014-06-23 16:52:18 +04:00
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Token',
fields=[
('key', models.CharField(max_length=40, serialize=False, primary_key=True)),
('created', models.DateTimeField(auto_now_add=True)),
('user', models.OneToOneField(related_name=b'auth_token', to=settings.AUTH_USER_MODEL)),
2014-06-23 16:52:18 +04:00
],
options={
},
bases=(models.Model,),
),
]