pki.views.caΒΆ

CA views for the PKI application.

AttributesΒΆ

ClassesΒΆ

CaTableView

Table view for all CAs with hierarchy information.

CaBulkDeleteConfirmView

View to confirm the deletion of multiple CAs.

Module ContentsΒΆ

pki.views.ca.logger[source]ΒΆ
class pki.views.ca.CaTableView[source]ΒΆ

Bases: trustpoint.views.base.ContextDataMixin, django.views.generic.ListView[pki.models.CaModel]

Table view for all CAs with hierarchy information.

model[source]ΒΆ
template_name = 'pki/cas/cas.html'[source]ΒΆ
context_object_name = 'cas'[source]ΒΆ
paginate_by = None[source]ΒΆ
context_page_category = 'pki'[source]ΒΆ
context_page_name = 'cas'[source]ΒΆ
get_queryset()[source]ΒΆ

Return all CA models with parent relationships and domains prefetched, ordered by hierarchy.

Return type:

django.db.models.QuerySet[pki.models.CaModel]

get_context_data(**kwargs)[source]ΒΆ

Add hierarchy information to each CA and apply hierarchical ordering.

Parameters:

kwargs (Any)

Return type:

dict[str, Any]

_hierarchical_sort(cas)[source]ΒΆ

Sort CAs hierarchically: roots first, then their children recursively.

Parameters:

cas (list[pki.models.CaModel]) – List of CA models to sort.

Returns:

Hierarchically sorted list of CAs.

Return type:

list[pki.models.CaModel]

class pki.views.ca.CaBulkDeleteConfirmView[source]ΒΆ

Bases: trustpoint.views.base.BulkDeleteView

View to confirm the deletion of multiple CAs.

model[source]ΒΆ
success_url[source]ΒΆ
ignore_url[source]ΒΆ
template_name = 'pki/cas/confirm_delete.html'[source]ΒΆ
context_object_name = 'cas'[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 CAs on valid form.

Parameters:

form (django.forms.Form)

Return type:

django.http.HttpResponse