signer.views
Contains all the views of Signer App.
Module Contents
-
class signer.views.SignerContextMixin[source]
Bases: trustpoint.views.base.ContextDataMixin
Mixin which adds context_data for the Signer pages.
-
context_page_category = 'signer'[source]
-
class signer.views.SignerTableView[source]
Bases: SignerContextMixin, trustpoint.views.base.SortableTableMixin[signer.models.SignerModel], django.views.generic.ListView[signer.models.SignerModel]
Signer Table View.
-
model[source]
-
template_name = 'signer/signers.html'[source]
-
context_object_name = 'signers'[source]
-
paginate_by = 50[source]
-
default_sort_param = 'unique_name'[source]
-
class signer.views.SignerAddMethodSelectView[source]
Bases: SignerContextMixin, django.views.generic.edit.FormView[signer.forms.SignerAddMethodSelectForm]
View to select the method to add a Signer.
-
template_name = 'signer/add/method_select.html'[source]
-
form_class[source]
-
form_valid(form)[source]
Redirect to the next step based on the selected method.
- Parameters:
form (signer.forms.SignerAddMethodSelectForm)
- Return type:
django.http.HttpResponseRedirect
-
class signer.views.SignerAddFileImportFileTypeSelectView[source]
Bases: SignerContextMixin, django.views.generic.edit.FormView[signer.forms.SignerAddFileTypeSelectForm]
View to select the file type when importing a Signer.
-
template_name = 'signer/add/file_type_select.html'[source]
-
form_class[source]
-
form_valid(form)[source]
Redirect to the next step based on the selected file type.
- Parameters:
form (signer.forms.SignerAddFileTypeSelectForm)
- Return type:
django.http.HttpResponseRedirect
-
class signer.views.SignerAddFileImportPkcs12View[source]
Bases: SignerContextMixin, django.views.generic.edit.FormView[signer.forms.SignerAddFileImportPkcs12Form]
View to import an Issuing CA from a PKCS12 file.
-
template_name = 'signer/add/file_import.html'[source]
-
form_class[source]
-
success_url[source]
-
form_valid(form)[source]
Handle the case where the form is valid.
- Parameters:
form (signer.forms.SignerAddFileImportPkcs12Form)
- Return type:
django.http.HttpResponse
-
class signer.views.SignerAddFileImportSeparateFilesView[source]
Bases: SignerContextMixin, django.views.generic.edit.FormView[signer.forms.SignerAddFileImportSeparateFilesForm]
View to import a Signer from separate PEM files.
-
template_name = 'signer/add/file_import.html'[source]
-
form_class[source]
-
success_url[source]
-
form_valid(form)[source]
Handle the case where the form is valid.
- Parameters:
form (signer.forms.SignerAddFileImportSeparateFilesForm)
- Return type:
django.http.HttpResponse
-
class signer.views.SignerConfigView[source]
Bases: trustpoint.logger.LoggerMixin, SignerContextMixin, django.views.generic.DetailView[signer.models.SignerModel]
View to display the details of a Signer.
-
http_method_names = ('get',)[source]
-
model[source]
-
success_url[source]
-
ignore_url[source]
-
template_name = 'signer/signer_config.html'[source]
-
context_object_name = 'signer'[source]
-
get_context_data(**kwargs)[source]
Adds the issued certificates to the context.
- Parameters:
**kwargs (Any) β Keyword arguments passed to super().get_context_data()
- Returns:
The context to render the page.
- Return type:
dict[str, Any]
-
class signer.views.SignedMessagesListView[source]
Bases: SignerContextMixin, django.views.generic.ListView[signer.models.SignedMessageModel]
View to display all signed messages by a specific Signer.
-
model[source]
-
template_name = 'signer/signed_messages.html'[source]
-
context_object_name = 'signed_messages'[source]
-
get_queryset()[source]
Gets the required and filtered QuerySet.
- Returns:
The filtered QuerySet.
- Return type:
django.db.models.QuerySet[signer.models.SignedMessageModel]
-
get_context_data(**kwargs)[source]
Adds the signer model object to the context.
- Parameters:
**kwargs (Any) β Keyword arguments passed to super().get_context_data()
- Returns:
The context to render the page.
- Return type:
dict[str, Any]
-
class signer.views.SignerBulkDeleteConfirmView[source]
Bases: SignerContextMixin, trustpoint.views.base.BulkDeleteView
View to confirm the deletion of multiple Signers.
-
model[source]
-
success_url[source]
-
ignore_url[source]
-
template_name = 'signer/confirm_delete.html'[source]
-
context_object_name = 'signers'[source]
-
form_valid(form)[source]
Delete the selected Signers on valid form.
- Parameters:
form (Any)
- Return type:
django.http.HttpResponse
-
class signer.views.SignHashView[source]
Bases: trustpoint.logger.LoggerMixin, SignerContextMixin, django.views.generic.edit.FormView[signer.forms.SignHashForm]
View for signing a hash value with a selected signer.
-
template_name = 'signer/sign_hash.html'[source]
-
form_class[source]
-
success_url[source]
-
form_valid(form)[source]
Sign the hash and display the signature.
- Parameters:
form (signer.forms.SignHashForm)
- Return type:
django.http.HttpResponse
-
class signer.views.SignHashSuccessView(**kwargs)[source]
Bases: SignerContextMixin, django.views.View
View to display the signature result.
-
template_name = 'signer/sign_hash_success.html'[source]
-
get(request)[source]
Display the signature result.
- Parameters:
request (django.http.HttpRequest) β The HTTP request.
- Returns:
HttpResponse with the signature result.
- Return type:
django.http.HttpResponse
-
get_context_data(**kwargs)[source]
Get context data for the view.
- Parameters:
kwargs (Any)
- Return type:
dict[Any, Any]