File: __init__.py

package info (click to toggle)
django-polymorphic 4.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 892 kB
  • sloc: python: 6,784; javascript: 263; makefile: 137
file content (41 lines) | stat: -rw-r--r-- 1,459 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
"""
ModelAdmin code to display polymorphic models.

The admin consists of a parent admin (which shows in the admin with a list),
and a child admin (which is used internally to show the edit/delete dialog).
"""

# Admins for the regular models
from .parentadmin import PolymorphicParentModelAdmin  # noqa
from .childadmin import PolymorphicChildModelAdmin
from .filters import PolymorphicChildModelFilter

# Utils
from .forms import PolymorphicModelChoiceForm

# Expose generic admin features too. There is no need to split those
# as the admin already relies on contenttypes.
from .generic import GenericPolymorphicInlineModelAdmin  # base class
from .generic import GenericStackedPolymorphicInline  # stacked inline

# Helpers for the inlines
from .helpers import PolymorphicInlineSupportMixin  # mixin for the regular model admin!
from .helpers import PolymorphicInlineAdminForm, PolymorphicInlineAdminFormSet

# Inlines
from .inlines import PolymorphicInlineModelAdmin  # base class
from .inlines import StackedPolymorphicInline  # stacked inline

__all__ = (
    "PolymorphicParentModelAdmin",
    "PolymorphicChildModelAdmin",
    "PolymorphicModelChoiceForm",
    "PolymorphicChildModelFilter",
    "PolymorphicInlineAdminForm",
    "PolymorphicInlineAdminFormSet",
    "PolymorphicInlineSupportMixin",
    "PolymorphicInlineModelAdmin",
    "StackedPolymorphicInline",
    "GenericPolymorphicInlineModelAdmin",
    "GenericStackedPolymorphicInline",
)