mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-13 05:06:53 +03:00
0407a0df8a
Thanks to Jon Dufresne (@jdufresne) for review. Co-authored-by: Asif Saif Uddin <auvipy@gmail.com> Co-authored-by: Rizwan Mansuri <Rizwan@webbyfox.com>
24 lines
706 B
Python
24 lines
706 B
Python
from django.conf import settings
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Token',
|
|
fields=[
|
|
('key', models.CharField(primary_key=True, serialize=False, max_length=40)),
|
|
('created', models.DateTimeField(auto_now_add=True)),
|
|
('user', models.OneToOneField(to=settings.AUTH_USER_MODEL, related_name='auth_token', on_delete=models.CASCADE)),
|
|
],
|
|
options={
|
|
},
|
|
bases=(models.Model,),
|
|
),
|
|
]
|