pki.views.cert_profiles
Views for Certificate Profile management.
Module Contents
-
class pki.views.cert_profiles.CertProfileContextMixin[source]
Bases: trustpoint.views.base.ContextDataMixin
Mixin which adds context_data for the PKI -> Cert Profiles pages.
-
context_page_category = 'pki'[source]
-
context_page_name = 'cert_profiles'[source]
-
class pki.views.cert_profiles.CertProfileTableView[source]
Bases: CertProfileContextMixin, trustpoint.views.base.SortableTableMixin[pki.models.CertificateProfileModel], django.views.generic.list.ListView[pki.models.CertificateProfileModel]
Certificate Profile Table View.
-
model[source]
-
template_name = 'pki/cert_profiles/cert_profiles.html'[source]
-
context_object_name = 'cert_profiles'[source]
-
paginate_by = 50[source]
-
default_sort_param = 'unique_name'[source]
-
class pki.views.cert_profiles.CertProfileConfigView[source]
Bases: trustpoint.logger.LoggerMixin, CertProfileContextMixin, django.views.generic.edit.UpdateView[pki.models.CertificateProfileModel, pki.forms.CertProfileConfigForm]
View to display the details of and edit a Certificate Profile.
-
http_method_names = ('get', 'post')[source]
-
model[source]
-
success_url[source]
-
template_name = 'pki/cert_profiles/config.html'[source]
-
context_object_name = 'profile'[source]
-
form_class[source]
-
get_object(_queryset=None)[source]
Retrieve the CertificateProfileModel object based on the primary key in the URL.
- Parameters:
_queryset (django.db.models.QuerySet[Any, Any] | None)
- Return type:
pki.models.CertificateProfileModel | None
-
get_context_data(**kwargs)[source]
Add additional context data.
- Parameters:
kwargs (Any)
- Return type:
dict[str, Any]
-
get_initial()[source]
Initialize the form with default values.
- Return type:
dict[str, Any]
-
form_valid(form)[source]
Handle the case where the form is valid.
- Parameters:
form (pki.forms.CertProfileConfigForm)
- Return type:
django.http.HttpResponse
-
class pki.views.cert_profiles.CertProfileIssuanceView[source]
Bases: trustpoint.logger.LoggerMixin, CertProfileContextMixin, django.views.generic.edit.FormView[pki.forms.CertificateIssuanceForm]
View to display the issuance form for a Certificate Profile.
-
http_method_names = ('get', 'post')[source]
-
template_name = 'pki/cert_profiles/issuance.html'[source]
-
form_class[source]
-
dispatch(request, *args, **kwargs)[source]
Dispatch the request, ensuring the profile exists.
- Parameters:
-
- Return type:
django.http.HttpResponse
-
get_form_kwargs()[source]
Get form kwargs, including the profile.
- Return type:
dict[str, Any]
-
get_context_data(**kwargs)[source]
Add additional context data.
- Parameters:
kwargs (Any)
- Return type:
dict[str, Any]
-
form_invalid(form)[source]
Handle the case where the form is invalid.
- Parameters:
form (pki.forms.CertificateIssuanceForm)
- Return type:
django.http.HttpResponse
-
form_valid(form)[source]
Handle the case where the form is valid.
- Parameters:
form (pki.forms.CertificateIssuanceForm)
- Return type:
django.http.HttpResponse
-
class pki.views.cert_profiles.CertProfileBulkDeleteConfirmView[source]
Bases: CertProfileContextMixin, trustpoint.views.base.BulkDeleteView
View to confirm the deletion of multiple certificate profiles.
-
model[source]
-
success_url[source]
-
ignore_url[source]
-
template_name = 'pki/cert_profiles/confirm_delete.html'[source]
-
context_object_name = 'cert_profiles'[source]
-
queryset: django.db.models.QuerySet[pki.models.CertificateProfileModel][source]
-
get(request, *args, **kwargs)[source]
Handle GET requests.
- Parameters:
-
- 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
-
class pki.views.cert_profiles.CertProfileViewSet(**kwargs)[source]
Bases: rest_framework.viewsets.ModelViewSet[pki.models.CertificateProfileModel]
ViewSet for managing Certificate Profile instances.
Supports standard CRUD operations such as list, retrieve,
create, update, and delete.
-
queryset[source]
-
serializer_class[source]
-
permission_classes[source]
-
filter_backends[source]
-
filterset_fields: ClassVar = ['unique_name', 'created_at'][source]
-
search_fields: ClassVar = ['unique_name', 'display_name'][source]
-
ordering_fields: ClassVar = ['unique_name', 'created_at'][source]