DetailView

class djmvc.views.detail.DetailView(**kwargs)[source]

Bases: ObjectMixin, JsonMixin, ModelMixin, TemplateViewMixin, DetailView

Read-only object page.

tags

Menu tags. Default ['object'].

Type:

list[str]

default_template_name

Detail template.

Type:

str

icon

Bootstrap Icons name.

Type:

str

color

Bulma button colour modifier.

Type:

str

permission_shortcode

Django permission prefix. Default 'view'.

Type:

str

fields

Field names to display, or '__all__'.

Type:

list[str] | str

exclude

Field names omitted when fields is '__all__'.

Type:

list[str]

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

breadcrumbs()[source]

Breadcrumb trail via list view, optionally including this view.

property breadcrumb_title

Breadcrumb label; defaults to title.

property visible_fields

Field names shown on the detail page.

property display_fields

Field metadata and rendered values for the detail template.

property model_fields

Simplified label/value pairs for fields shown on the detail page.