2021-01-14 00:19:22 +08:00
|
|
|
from django.contrib.admin.decorators import action, display, register
|
2015-06-16 02:07:31 +08:00
|
|
|
from django.contrib.admin.filters import (
|
|
|
|
AllValuesFieldListFilter,
|
|
|
|
BooleanFieldListFilter,
|
|
|
|
ChoicesFieldListFilter,
|
2018-01-06 06:53:51 +08:00
|
|
|
DateFieldListFilter,
|
|
|
|
EmptyFieldListFilter,
|
|
|
|
FieldListFilter,
|
|
|
|
ListFilter,
|
|
|
|
RelatedFieldListFilter,
|
|
|
|
RelatedOnlyFieldListFilter,
|
|
|
|
SimpleListFilter,
|
2015-06-16 02:07:31 +08:00
|
|
|
)
|
|
|
|
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__ = [
|
2021-01-14 00:19:22 +08:00
|
|
|
"action",
|
|
|
|
"display",
|
|
|
|
"register",
|
|
|
|
"ModelAdmin",
|
|
|
|
"HORIZONTAL",
|
|
|
|
"VERTICAL",
|
|
|
|
"StackedInline",
|
|
|
|
"TabularInline",
|
|
|
|
"AdminSite",
|
|
|
|
"site",
|
|
|
|
"ListFilter",
|
|
|
|
"SimpleListFilter",
|
|
|
|
"FieldListFilter",
|
|
|
|
"BooleanFieldListFilter",
|
|
|
|
"RelatedFieldListFilter",
|
|
|
|
"ChoicesFieldListFilter",
|
|
|
|
"DateFieldListFilter",
|
2018-01-06 06:53:51 +08:00
|
|
|
"AllValuesFieldListFilter",
|
|
|
|
"EmptyFieldListFilter",
|
|
|
|
"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)
|