mirror of
				https://github.com/django/django.git
				synced 2025-10-26 07:06:08 +00:00 
			
		
		
		
	This also changes the default type of auto-created primary keys for new apps and projects to BigAutoField.
		
			
				
	
	
		
			39 lines
		
	
	
		
			723 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			723 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from django.apps import AppConfig
 | |
| 
 | |
| 
 | |
| class MyAdmin(AppConfig):
 | |
|     name = 'django.contrib.admin'
 | |
|     verbose_name = "Admin sweet admin."
 | |
| 
 | |
| 
 | |
| class MyAuth(AppConfig):
 | |
|     name = 'django.contrib.auth'
 | |
|     label = 'myauth'
 | |
|     verbose_name = "All your password are belong to us."
 | |
| 
 | |
| 
 | |
| class BadConfig(AppConfig):
 | |
|     """This class doesn't supply the mandatory 'name' attribute."""
 | |
| 
 | |
| 
 | |
| class NotAConfig:
 | |
|     name = 'apps'
 | |
| 
 | |
| 
 | |
| class NoSuchApp(AppConfig):
 | |
|     name = 'there is no such app'
 | |
| 
 | |
| 
 | |
| class PlainAppsConfig(AppConfig):
 | |
|     name = 'apps'
 | |
| 
 | |
| 
 | |
| class RelabeledAppsConfig(AppConfig):
 | |
|     name = 'apps'
 | |
|     label = 'relabeled'
 | |
| 
 | |
| 
 | |
| class ModelPKAppsConfig(AppConfig):
 | |
|     name = 'apps'
 | |
|     default_auto_field = 'django.db.models.BigAutoField'
 |