pki.views.owner_credentialsΒΆ

Views for Owner Credential (DevOwnerID) management.

ClassesΒΆ

OwnerCredentialContextMixin

Mixin which adds context_data for the PKI -> Issuing CAs pages.

OwnerCredentialTableView

Owner Credential Table View.

OwnerCredentialDetailView

View to display the details of an Issuing CA.

OwnerCredentialAddView

View to import a DevOwnerID from separate PEM files.

OwnerCredentialBulkDeleteConfirmView

View to confirm the deletion of multiple owner credentials.

Module ContentsΒΆ

class pki.views.owner_credentials.OwnerCredentialContextMixin[source]ΒΆ

Bases: trustpoint.views.base.ContextDataMixin

Mixin which adds context_data for the PKI -> Issuing CAs pages.

context_page_category = 'pki'[source]ΒΆ
context_page_name = 'owner_credentials'[source]ΒΆ
class pki.views.owner_credentials.OwnerCredentialTableView[source]ΒΆ

Bases: OwnerCredentialContextMixin, trustpoint.views.base.SortableTableMixin[pki.models.OwnerCredentialModel], django.views.generic.list.ListView[pki.models.OwnerCredentialModel]

Owner Credential Table View.

model[source]ΒΆ
template_name = 'pki/owner_credentials/owner_credentials.html'[source]ΒΆ
context_object_name = 'owner_credential'[source]ΒΆ
paginate_by = 50[source]ΒΆ
default_sort_param = 'unique_name'[source]ΒΆ
class pki.views.owner_credentials.OwnerCredentialDetailView[source]ΒΆ

Bases: trustpoint.logger.LoggerMixin, OwnerCredentialContextMixin, django.views.generic.detail.DetailView[pki.models.OwnerCredentialModel]

View to display the details of an Issuing CA.

http_method_names = ('get',)[source]ΒΆ
model[source]ΒΆ
success_url[source]ΒΆ
ignore_url[source]ΒΆ
template_name = 'pki/owner_credentials/details.html'[source]ΒΆ
context_object_name = 'owner_credential'[source]ΒΆ
get_context_data(**kwargs)[source]ΒΆ

Adds the issued certificates to the context.

Parameters:

**kwargs (Any) – Keyword arguments passed to super().get_context_data()

Returns:

The context to render the page.

Return type:

dict[str, Any]

class pki.views.owner_credentials.OwnerCredentialAddView[source]ΒΆ

Bases: OwnerCredentialContextMixin, django.views.generic.edit.FormView[pki.forms.OwnerCredentialFileImportForm]

View to import a DevOwnerID from separate PEM files.

template_name = 'pki/owner_credentials/add.html'[source]ΒΆ
form_class[source]ΒΆ
success_url[source]ΒΆ
form_valid(form)[source]ΒΆ

Handle the case where the form is valid.

Parameters:

form (pki.forms.OwnerCredentialFileImportForm)

Return type:

django.http.HttpResponse

class pki.views.owner_credentials.OwnerCredentialBulkDeleteConfirmView[source]ΒΆ

Bases: OwnerCredentialContextMixin, trustpoint.views.base.BulkDeleteView

View to confirm the deletion of multiple owner credentials.

model[source]ΒΆ
success_url[source]ΒΆ
ignore_url[source]ΒΆ
template_name = 'pki/owner_credentials/confirm_delete.html'[source]ΒΆ
context_object_name = 'owner_credentials'[source]ΒΆ
get(request, *args, **kwargs)[source]ΒΆ

Handle GET requests.

Parameters:
  • request (django.http.HttpRequest)

  • args (Any)

  • kwargs (Any)

Return type:

django.http.HttpResponse

form_valid(form)[source]ΒΆ

Delete the selected credentials on valid form.

Parameters:

form (django.forms.Form)

Return type:

django.http.HttpResponse