mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	This also changes the default type of auto-created primary keys for new apps and projects to BigAutoField.
		
			
				
	
	
		
			26 lines
		
	
	
		
			576 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			576 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from django.apps import AppConfig
 | |
| 
 | |
| 
 | |
| class ModelDefaultPKConfig(AppConfig):
 | |
|     name = 'model_options'
 | |
| 
 | |
| 
 | |
| class ModelPKConfig(AppConfig):
 | |
|     name = 'model_options'
 | |
|     default_auto_field = 'django.db.models.SmallAutoField'
 | |
| 
 | |
| 
 | |
| class ModelPKNonAutoConfig(AppConfig):
 | |
|     name = 'model_options'
 | |
|     default_auto_field = 'django.db.models.TextField'
 | |
| 
 | |
| 
 | |
| class ModelPKNoneConfig(AppConfig):
 | |
|     name = 'model_options'
 | |
|     default_auto_field = None
 | |
| 
 | |
| 
 | |
| class ModelPKNonexistentConfig(AppConfig):
 | |
|     name = 'model_options'
 | |
|     default_auto_field = 'django.db.models.NonexistentAutoField'
 |