categories.genericcollection.GenericCollectionInlineModelAdmin
GenericCollectionInlineModelAdmin#
- class categories.genericcollection.GenericCollectionInlineModelAdmin(parent_model, admin_site)[source]#
Inline admin for generic model collections.
Methods
check(**kwargs)formfield_for_choice_field(db_field, ...)Get a form Field for a database Field that has declared choices.
formfield_for_dbfield(db_field, request, ...)Hook for specifying the form Field instance for a given database Field instance.
formfield_for_foreignkey(db_field, request, ...)Get a form Field for a ForeignKey.
formfield_for_manytomany(db_field, request, ...)Get a form Field for a ManyToManyField.
get_autocomplete_fields(request)Return a list of ForeignKey and/or ManyToMany fields which should use an autocomplete widget.
get_content_types()Get the content types supported by this collection.
get_empty_value_display()Return the empty_value_display set on ModelAdmin or AdminSite.
get_exclude(request[, obj])Hook for specifying exclude.
get_extra(request[, obj])Hook for customizing the number of extra inline forms.
get_field_queryset(db, db_field, request)If the ModelAdmin specifies ordering, the queryset should respect that ordering.
get_fields(request[, obj])Hook for specifying fields.
get_fieldsets(request[, obj])Hook for specifying fieldsets.
get_formset(request[, obj])Get the formset for the generic collection.
get_inlines(request, obj)Hook for specifying custom inlines.
get_max_num(request[, obj])Hook for customizing the max number of extra inline forms.
get_min_num(request[, obj])Hook for customizing the min number of inline forms.
get_ordering(request)Hook for specifying field ordering.
get_prepopulated_fields(request[, obj])Hook for specifying custom prepopulated fields.
get_queryset(request)Return a QuerySet of all model instances that can be edited by the admin site.
get_readonly_fields(request[, obj])Hook for specifying custom readonly fields.
get_sortable_by(request)Hook for specifying which fields can be sorted in the changelist.
get_view_on_site_url([obj])has_add_permission(request, obj)Return True if the given request has permission to add an object.
has_change_permission(request[, obj])Return True if the given request has permission to change the given Django model instance, the default implementation doesn't examine the obj parameter.
has_delete_permission(request[, obj])Return True if the given request has permission to change the given Django model instance, the default implementation doesn't examine the obj parameter.
has_module_permission(request)Return True if the given request has any permission in the given app label.
has_view_or_change_permission(request[, obj])has_view_permission(request[, obj])Return True if the given request has permission to view the given Django model instance.
lookup_allowed(lookup, value)to_field_allowed(request, to_field)Return True if the model associated with this admin should be allowed to be referenced by the specified field.
Attributes
autocomplete_fieldscan_deleteclassesct_fieldct_fk_fieldexcludeextrafieldsfilter_horizontalfilter_verticalfk_nameformfield_overridesmax_nummediamin_nummodelorderingprepopulated_fieldsradio_fieldsraw_id_fieldsreadonly_fieldsshow_change_linkshow_full_result_countsortable_bytemplateverbose_nameverbose_name_pluralview_on_site