mirror of
				https://github.com/encode/django-rest-framework.git
				synced 2025-11-04 09:57:55 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
		
			745 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			745 B
		
	
	
	
		
			Python
		
	
	
	
	
	
# -*- coding: utf-8 -*-
 | 
						|
from __future__ import unicode_literals
 | 
						|
 | 
						|
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')),
 | 
						|
            ],
 | 
						|
            options={
 | 
						|
            },
 | 
						|
            bases=(models.Model,),
 | 
						|
        ),
 | 
						|
    ]
 |