mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 18:13:57 +03:00
28 lines
761 B
Python
28 lines
761 B
Python
# encoding: utf8
|
|
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)),
|
|
('user', models.OneToOneField(to=settings.AUTH_USER_MODEL, to_field='id')),
|
|
('created', models.DateTimeField(auto_now_add=True)),
|
|
],
|
|
options={
|
|
'abstract': False,
|
|
},
|
|
bases=(models.Model,),
|
|
),
|
|
]
|