admin.AdminSite.register()

AdminSite.register(model_or_iterable, admin_class=None, **options) [source]

Registers the given model class (or iterable of classes) with the given admin_class. admin_class defaults to 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 ImproperlyConfigured if a model is abstract. and django.contrib.admin.sites.AlreadyRegistered if a model is already registered.

doc_Django
2016-10-09 18:33:26
Comments
Leave a Comment

Please login to continue.