Admin for Abstracts — Django Building Blocks documentation

# Admin for Abstracts

Admins for models extending building_blocks.models.abstracts

- Archivable

  - Admin Blocks

  - Mixins

  - Filters

- Publishable

  - Admin Blocks

  - Mixins

  - Filters

- Status

## Archivable

Admins for models extending Archivable

### Admin Blocks

class building_blocks.admin.abstracts.archivable.ArchivableAdminBlock

  AdminBlock for models extending KaosModel

  Parameters

    - actions – (‘archive’, ‘restore’)

    - admin_fields – (‘is_available’,)

    - extra_admin_fields – (‘is_archived’,)

    - extra_list_display – (‘is_archived’,)

    - readonly_fields – (‘is_available’, ‘is_archived’)

    - list_filter – (ArchivableAdminFilter,)

class building_blocks.admin.abstracts.archivable.ArchivableHasUUIDAdminBlock

  Bases: `ArchivableAdminBlock`, `HasUUIDAdminBlock`, `AdminBlock`

building_blocks.admin.abstracts.archivable.ArchivableUnnamedKaosModelAdminBlock

  alias of `XXXAdminBlock`

class building_blocks.admin.abstracts.archivable.ArchivableKaosModelAdminBlock

  Bases: `ArchivableAdminBlock`, `KaosModelAdminBlock`, `AdminBlock`

building_blocks.admin.abstracts.archivable.ArchivableSluggedKaosModelAdminBlock

  alias of `XXXAdminBlock`

### Mixins

class building_blocks.admin.abstracts.archivable.BaseArchivableMixinAdmin

  Bases: `BaseModelAdmin`

  Mixin for ArchivableAdmin with archive and restore actions and display fields

class building_blocks.admin.abstracts.archivable.BaseStatusArchivableMixinAdmin

  Bases: `BaseArchivableMixinAdmin`

  BaseArchivableMixinAdmin but for StatusArchivables

class building_blocks.admin.abstracts.archivable.BasicArchivableMixinAdmin(model, admin_site)

  Bases: `BaseArchivableMixinAdmin`, `ModelAdmin`

  Basic ArchivableMixinAdmin

class building_blocks.admin.abstracts.archivable.ArchivableChangeActionsAdminMixin

  Bases: `DjangoObjectActionsPermissionsMixin`, `DjangoObjectActions`

  Mixin to bring in DjangoObjectActions enhancements to ArchivableAdmins

class building_blocks.admin.abstracts.archivable.ArchivableMixinAdmin(*args, **kwargs)

  Bases: `AreYouSureActionsAdminMixin`, `ArchivableChangeActionsAdminMixin`, `BasicArchivableMixinAdmin`

  Mixin this class to model admins for models extending Archivable

### Filters

class building_blocks.admin.abstracts.filters.ArchivableAdminFilter(request, params, model, model_admin)

  Bases: `QuerysetChoiceFilter`

  Admin filter to filter archivable objects by their availability status

## Publishable

### Admin Blocks

class building_blocks.admin.abstracts.publishable.PublishableAdminBlock

  Bases: `HasStatusAdminBlock`

class building_blocks.admin.abstracts.publishable.PublishableKaosModelAdminBlock

  Bases: `PublishableAdminBlock`, `KaosModelAdminBlock`, `AdminBlock`

building_blocks.admin.abstracts.publishable.PublishableSluggedKaosModelAdminBlock

  alias of `XXXAdminBlock`

### Mixins

class building_blocks.admin.abstracts.publishable.BasePublishableMixinAdmin

  Bases: `BaseStatusArchivableMixinAdmin`

class building_blocks.admin.abstracts.publishable.BasicPublishableMixinAdmin(model, admin_site)

  Bases: `BasePublishableMixinAdmin`, `ModelAdmin`

class building_blocks.admin.abstracts.publishable.PublishableMixinAdmin(*args, **kwargs)

  Bases: `AreYouSureActionsAdminMixin`, `ArchivableChangeActionsAdminMixin`, `BasicPublishableMixinAdmin`

### Filters

class building_blocks.admin.abstracts.filters.PublishableAdminFilter(request, params, model, model_admin)

  Bases: `ArchivableAdminFilter`

  Admin filter to filter publishable objects by their publishing status

## Status

class building_blocks.admin.abstracts.status.HasStatusAdminBlock

  Bases: `AdminBlock`