mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	[1.10.x] Fixed #27076 -- Documented contrib.admin.sites.AdminSite.register().
Backport of 0f6829a68a from master
			
			
This commit is contained in:
		
				
					committed by
					
						 Tim Graham
						Tim Graham
					
				
			
			
				
	
			
			
			
						parent
						
							a9fefd26dc
						
					
				
				
					commit
					933ebfad06
				
			| @@ -2671,6 +2671,18 @@ Templates can override or extend base admin templates as described in | ||||
|     :attr:`User.is_staff <django.contrib.auth.models.User.is_staff>` to be | ||||
|     ``True``. | ||||
|  | ||||
| .. method:: AdminSite.register(model_or_iterable, admin_class=None, **options) | ||||
|  | ||||
|     Registers the given model class (or iterable of classes) with the given | ||||
|     ``admin_class``. ``admin_class`` defaults to | ||||
|     :class:`~django.contrib.admin.ModelAdmin` (the default admin options). If | ||||
|     keyword arguments are given -- e.g. ``list_display`` -- they'll be applied | ||||
|     as options to the admin class. | ||||
|  | ||||
|     Raises :class:`~django.core.exceptions.ImproperlyConfigured` if a model is | ||||
|     abstract. and ``django.contrib.admin.sites.AlreadyRegistered`` if a model | ||||
|     is already registered. | ||||
|  | ||||
| Hooking ``AdminSite`` instances into your URLconf | ||||
| ------------------------------------------------- | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user