Views

class document_catalogue.views.BaseDocumentListView(**kwargs)[source]

Base class / mixin for views that list documents. Plugin architecture used to inject custom view logic. See plugins.

dispatch(request, *args, **kwargs)[source]

Apply any plugins

get_context_data(**kwargs)[source]

Get the context for this view.

get_queryset()[source]

Return the list of items for this view.

The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.

class document_catalogue.views.CatalogueViewMixin(**kwargs)[source]

Mixin for all Document Views

class document_catalogue.views.CategoryListViewMixin[source]

Mixin for views that navigate categories or display a list of categories

class document_catalogue.views.CategorySlugViewMixin[source]

Mixin for views that take a category slug as a URL arg

class document_catalogue.views.CatgetoryContextViewMixin[source]

Mixing for views that supply context about a category

class document_catalogue.views.DocumentAjaxAPI(**kwargs)[source]

Async API for document actions Plays nice with document_catalogue.js and dropzone

get(request, *args, **kwargs)[source]

Ajax Search for documents matching search term in ?q= request param

class document_catalogue.views.DocumentCatalogueListView(**kwargs)[source]

List all categories in the Catalogue

class document_catalogue.views.DocumentCategoryListView(**kwargs)[source]

List all documents in a given category

get_context_data(**kwargs)[source]

Get the context for this view.

class document_catalogue.views.DocumentDeleteView(**kwargs)[source]

Delete a single document

model

alias of document_catalogue.models.Document

class document_catalogue.views.DocumentDetailView(**kwargs)[source]

Display detailed information about a single document

model

alias of document_catalogue.models.Document

class document_catalogue.views.DocumentDownloadView(**kwargs)[source]

Redirect to the file URL

get_redirect_url(*args, **kwargs)[source]

Return the document’s file download URL

class document_catalogue.views.DocumentEditView(**kwargs)[source]

Display detailed information about a single document

form_class

alias of document_catalogue.forms.DocumentEditForm

model

alias of document_catalogue.models.Document

class document_catalogue.views.DocumentPkMixin[source]

Mixins for views that take a document pk as a URL arg

class document_catalogue.views.DocumentViewMixin[source]

Mixins for views that display a document

document_catalogue.views.get_permissions_context(view)[source]

Return a dictionary of permissions (partials that can be called with no arguments)