django1/django/contrib/admin/__init__.py

25 lines
1.0 KiB
Python
Raw Normal View History

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, 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,
)
from django.contrib.admin.sites import AdminSite, site
from django.utils.module_loading import autodiscover_modules
__all__ = [
"register", "ModelAdmin", "HORIZONTAL", "VERTICAL", "StackedInline",
"TabularInline", "AdminSite", "site", "ListFilter", "SimpleListFilter",
"FieldListFilter", "BooleanFieldListFilter", "RelatedFieldListFilter",
"ChoicesFieldListFilter", "DateFieldListFilter",
"AllValuesFieldListFilter", "EmptyFieldListFilter",
"RelatedOnlyFieldListFilter", "autodiscover",
]
def autodiscover():
autodiscover_modules('admin', register_to=site)