2012-12-18 08:04:10 +08:00
|
|
|
from django.contrib.admin.decorators import register
|
2015-06-16 02:07:31 +08:00
|
|
|
from django.contrib.admin.filters import (
|
|
|
|
AllValuesFieldListFilter, BooleanFieldListFilter, ChoicesFieldListFilter,
|
|
|
|
DateFieldListFilter, FieldListFilter, ListFilter, RelatedFieldListFilter,
|
|
|
|
RelatedOnlyFieldListFilter, SimpleListFilter,
|
|
|
|
)
|
|
|
|
from django.contrib.admin.options import (
|
|
|
|
HORIZONTAL, VERTICAL, ModelAdmin, StackedInline, TabularInline,
|
|
|
|
)
|
2014-01-20 10:45:21 +08:00
|
|
|
from django.contrib.admin.sites import AdminSite, site
|
2013-09-07 07:23:25 +08:00
|
|
|
from django.utils.module_loading import autodiscover_modules
|
2008-07-19 07:54:34 +08:00
|
|
|
|
2013-10-18 19:25:30 +08:00
|
|
|
__all__ = [
|
2019-11-06 19:41:07 +08:00
|
|
|
"register", "ModelAdmin", "HORIZONTAL", "VERTICAL", "StackedInline",
|
|
|
|
"TabularInline", "AdminSite", "site", "ListFilter", "SimpleListFilter",
|
|
|
|
"FieldListFilter", "BooleanFieldListFilter", "RelatedFieldListFilter",
|
|
|
|
"ChoicesFieldListFilter", "DateFieldListFilter",
|
2014-05-21 18:32:19 +08:00
|
|
|
"AllValuesFieldListFilter", "RelatedOnlyFieldListFilter", "autodiscover",
|
2013-10-18 19:25:30 +08:00
|
|
|
]
|
|
|
|
|
2008-12-24 02:25:24 +08:00
|
|
|
|
2008-07-19 07:54:34 +08:00
|
|
|
def autodiscover():
|
2013-09-07 07:23:25 +08:00
|
|
|
autodiscover_modules('admin', register_to=site)
|
2014-01-20 10:45:21 +08:00
|
|
|
|
2014-01-25 05:43:00 +08:00
|
|
|
|
|
|
|
default_app_config = 'django.contrib.admin.apps.AdminConfig'
|