pki.views.certificates¶
This module contains all views concerning the PKI -> Certificates section.
Classes¶
View that redirects to the index of the PKI Issuing CA application: Issuing CAs. |
|
Mixin which adds some extra context for the PKI Views. |
|
Certificate Table View. |
|
The certificate detail view. |
|
View for downloading a single certificate. |
|
View for downloading a single certificate. |
|
View for downloading multiple certificates at once as archived files. |
|
View for downloading the TLS server certificate of trustpoint. |
Module Contents¶
- class pki.views.certificates.CertificatesRedirectView(**kwargs)[source]¶
Bases:
django.views.generic.base.RedirectViewView that redirects to the index of the PKI Issuing CA application: Issuing CAs.
- class pki.views.certificates.CertificatesContextMixin[source]¶
Mixin which adds some extra context for the PKI Views.
- class pki.views.certificates.CertificateTableView[source]¶
Bases:
CertificatesContextMixin,trustpoint.views.base.SortableTableMixin,django.views.generic.list.ListView[pki.models.CertificateModel]Certificate Table View.
- class pki.views.certificates.CertificateDetailView[source]¶
Bases:
CertificatesContextMixin,django.views.generic.detail.DetailView[pki.models.CertificateModel]The certificate detail view.
- class pki.views.certificates.CmpIssuingCaCertificateDownloadView[source]¶
Bases:
CertificatesContextMixin,django.views.generic.detail.DetailView[pki.models.CertificateModel]View for downloading a single certificate.
- get(_request, pk=None, *_args, **_kwargs)[source]¶
HTTP GET Method.
If only the certificate 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.
Compare the re_path regex in the pki.urls package.
- Parameters:
request – The HttpRequest object.
pk (str | None) – A string containing the certificate primary key.
*args – Positional arguments.
**kwargs – Keyword arguments.
_request (django.http.HttpRequest)
_args (Any)
_kwargs (Any)
- Returns:
The HTTP response with either the download summary or a file download.
- Return type:
HttpResponse
- Raises:
Http404 –
- class pki.views.certificates.CertificateDownloadView[source]¶
Bases:
CertificatesContextMixin,django.views.generic.detail.DetailView[pki.models.CertificateModel]View for downloading a single certificate.
- get(request, pk=None, file_format=None, *args, **kwargs)[source]¶
HTTP GET Method.
If only the certificate 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.
Compare the re_path regex in the pki.urls package.
- Parameters:
request (django.http.HttpRequest) – The HttpRequest object.
pk (str | None) – A string containing the certificate primary key.
file_format (str | None) – The format of the certificate to download.
*args (tuple[Any]) – Positional arguments.
**kwargs (dict[str, Any]) – Keyword arguments.
- Returns:
The HTTP response with either the download summary or a file download.
- Return type:
HttpResponse
- Raises:
Http404 –
- class pki.views.certificates.CertificateMultipleDownloadView[source]¶
Bases:
CertificatesContextMixin,trustpoint.views.base.PrimaryKeyListFromPrimaryKeyString,django.views.generic.list.ListView[pki.models.CertificateModel]View for downloading multiple certificates at once as archived files.
- get_context_data(*args, **kwargs)[source]¶
Adding the part of the url to the context, that contains the certificate primary keys.
This is used for the {% url }% tags in the template to download files.
- Parameters:
*args (Any) – Positional arguments passed to super().get_context_data().
**kwargs (Any) – Keyword arguments passed to super().get_context_data().
- Returns:
The context data.
- Return type:
dict
- get(request, pks=None, file_format=None, archive_format=None, *args, **kwargs)[source]¶
HTTP GET Method.
If only certificate primary keys are passed in the url, the download summary will be displayed. If value for file_format and archive_format are also provided, a file download will be performed.
Compare the re_path regex in the pki.urls package.
- Parameters:
request (django.http.HttpRequest) – The HttpRequest object.
pks (str | None) – A string containing the certificate primary keys, e.g. 1/2/3/4/5
file_format (None | str) – The format of the archived certificate files.
archive_format (None | str) – The archive format that will be provided as download.
*args (tuple[Any]) – Positional arguments.
**kwargs (dict[str, Any]) – Keyword arguments.
- Returns:
The HTTP response with either the download summary or a file download.
- Return type:
HttpResponse
- Raises:
Http404 –
- class pki.views.certificates.TlsServerCertificateDownloadView[source]¶
Bases:
CertificatesContextMixin,django.views.generic.detail.DetailView[pki.models.CertificateModel]View for downloading the TLS server certificate of trustpoint.