mirror of
				https://github.com/django/django.git
				synced 2025-10-30 17:16:10 +00:00 
			
		
		
		
	newforms-admin: Added missing 'self's to AdminSite class
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@4586 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		| @@ -11,7 +11,7 @@ class AdminSite(object): | |||||||
|     def __init__(self): |     def __init__(self): | ||||||
|         self._registry = {} # model_class -> admin_class |         self._registry = {} # model_class -> admin_class | ||||||
|  |  | ||||||
|     def register(model_or_iterable, admin_class=None, **options): |     def register(self, model_or_iterable, admin_class=None, **options): | ||||||
|         """ |         """ | ||||||
|         Registers the given model(s) with the given admin class. |         Registers the given model(s) with the given admin class. | ||||||
|  |  | ||||||
| @@ -30,7 +30,7 @@ class AdminSite(object): | |||||||
|                 raise AlreadyRegistered('The model %s is already registered' % model.__class__.__name__) |                 raise AlreadyRegistered('The model %s is already registered' % model.__class__.__name__) | ||||||
|             self._registry[model] = admin_class |             self._registry[model] = admin_class | ||||||
|  |  | ||||||
|     def unregister(model_or_iterable): |     def unregister(self, model_or_iterable): | ||||||
|         if issubclass(model_or_iterable, Model): |         if issubclass(model_or_iterable, Model): | ||||||
|             model_or_iterable = [model_or_iterable] |             model_or_iterable = [model_or_iterable] | ||||||
|         for model in model_or_iterable: |         for model in model_or_iterable: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user