Improve docs of PolymorphicChildModelAdmin attributes

fix_request_path_info
Diederik van der Boor 2017-09-30 16:35:21 +02:00
parent cf0cb2478f
commit c437524876
1 changed files with 14 additions and 1 deletions

View File

@ -27,10 +27,23 @@ class PolymorphicChildModelAdmin(admin.ModelAdmin):
* It allows to set ``base_form`` so the derived class will automatically include other fields in the form.
* It allows to set ``base_fieldsets`` so the derived class will automatically display any extra fields.
"""
#: The base model that the class uses (auto-detected if not set explicitly)
base_model = None
#: By setting ``base_form`` instead of ``form``, any subclass fields are automatically added to the form.
#: This is useful when your model admin class is inherited by others.
base_form = None
#: By setting ``base_fieldsets`` instead of ``fieldsets``,
#: any subclass fields can be automatically added.
#: This is useful when your model admin class is inherited by others.
base_fieldsets = None
extra_fieldset_title = _("Contents") # Default title for extra fieldset
#: Default title for extra fieldset
extra_fieldset_title = _("Contents")
#: Whether the child admin model should be visible in the admin index page.
show_in_index = False
def __init__(self, model, admin_site, *args, **kwargs):