mirror of
				https://github.com/encode/django-rest-framework.git
				synced 2025-10-30 23:47:53 +03:00 
			
		
		
		
	Thanks to Jon Dufresne (@jdufresne) for review. Co-authored-by: Asif Saif Uddin <auvipy@gmail.com> Co-authored-by: Rizwan Mansuri <Rizwan@webbyfox.com>
		
			
				
	
	
		
			22 lines
		
	
	
		
			563 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			563 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from django.conf import settings
 | |
| from django.db import migrations, models
 | |
| 
 | |
| 
 | |
| class Migration(migrations.Migration):
 | |
| 
 | |
|     initial = True
 | |
| 
 | |
|     dependencies = [
 | |
|         migrations.swappable_dependency(settings.AUTH_USER_MODEL),
 | |
|     ]
 | |
| 
 | |
|     operations = [
 | |
|         migrations.CreateModel(
 | |
|             name='CustomToken',
 | |
|             fields=[
 | |
|                 ('key', models.CharField(max_length=40, primary_key=True, serialize=False)),
 | |
|                 ('user', models.OneToOneField(on_delete=models.CASCADE, to=settings.AUTH_USER_MODEL)),
 | |
|             ],
 | |
|         ),
 | |
|     ]
 |