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