pki.views.crls ============== .. py:module:: pki.views.crls .. autoapi-nested-parse:: CRL views for the PKI application. Module Contents --------------- .. py:class:: CrlContextMixin Bases: :py:obj:`trustpoint.views.base.ContextDataMixin` Mixin which adds context_data for the PKI -> CRLs pages. .. py:attribute:: context_page_category :value: 'pki' .. py:attribute:: context_page_name :value: 'crls' .. py:class:: CrlTableView Bases: :py:obj:`CrlContextMixin`, :py:obj:`django.views.generic.ListView`\ [\ :py:obj:`pki.models.CrlModel`\ ] Table view for all CRLs. .. py:attribute:: model .. py:attribute:: template_name :value: 'pki/crls/crls.html' .. py:attribute:: context_object_name :value: 'crls' .. py:attribute:: paginate_by :value: None .. py:method:: get_queryset() Return all CRL models with related CA information. .. py:class:: CrlBulkDeleteConfirmView Bases: :py:obj:`trustpoint.views.base.BulkDeleteView` View to confirm the deletion of multiple CRLs. .. py:attribute:: model .. py:attribute:: success_url .. py:attribute:: ignore_url .. py:attribute:: template_name :value: 'pki/crls/confirm_delete.html' .. py:attribute:: context_object_name :value: 'crls' .. py:method:: get(request, *args, **kwargs) Handle GET requests. .. py:method:: form_valid(form) Delete the selected CRLs on valid form. .. py:class:: CrlDownloadView Bases: :py:obj:`CrlContextMixin`, :py:obj:`django.views.generic.detail.DetailView`\ [\ :py:obj:`pki.models.CrlModel`\ ] View for downloading a single CRL. .. py:attribute:: model .. py:attribute:: success_url .. py:attribute:: ignore_url .. py:attribute:: template_name :value: 'pki/crls/download.html' .. py:attribute:: context_object_name :value: 'crl' .. py:method:: get_queryset() Return all CRL models with related CA information. .. py:method:: get_object(queryset = None) Get the CRL object, handling both CRL primary keys and CA primary keys. .. py:method:: get(request, pk = None, file_format = None, *args, **kwargs) HTTP GET Method. If only the CRL primary key are passed in the url, the download summary will be displayed. If value for file_format is also provided, a file download will be performed. :param request: The HttpRequest object. :param pk: A string containing the CRL primary key. :param file_format: The format of the CRL to download. :param \*args: Positional arguments. :param \*\*kwargs: Keyword arguments. :returns: The HTTP response with either the download summary or a file download. :rtype: HttpResponse :raises Http404: .. py:class:: CrlDetailView Bases: :py:obj:`CrlContextMixin`, :py:obj:`django.views.generic.detail.DetailView`\ [\ :py:obj:`pki.models.CrlModel`\ ] Detail view for a single CRL. .. py:attribute:: model .. py:attribute:: success_url .. py:attribute:: ignore_url .. py:attribute:: template_name :value: 'pki/crls/details.html' .. py:attribute:: context_object_name :value: 'crl' .. py:method:: get_queryset() Return CRL models with related CA information. .. py:method:: get_object(queryset = None) Get the CRL object, handling both CRL primary keys and CA primary keys. .. py:method:: get_context_data(**kwargs) Add additional context data for the CRL detail view. .. py:class:: CrlImportForm(*args, **kwargs) Bases: :py:obj:`django.forms.Form` Form for importing CRLs. .. py:attribute:: crl_file .. py:attribute:: ca :type: django.forms.ModelChoiceField[pki.models.CaModel] .. py:attribute:: set_active .. py:class:: CrlImportView Bases: :py:obj:`CrlContextMixin`, :py:obj:`django.views.generic.edit.FormView`\ [\ :py:obj:`CrlImportForm`\ ] View for importing CRLs. .. py:attribute:: form_class .. py:attribute:: template_name :value: 'pki/crls/import.html' .. py:attribute:: success_url .. py:method:: form_valid(form) Handle valid form submission.