management.views.settingsΒΆ

Settings views.

AttributesΒΆ

ClassesΒΆ

SettingsView

Mixin which adds data to the context for the devices application.

ChangeLogLevelView

Intentionally simple parent class for all views. Only implements

Module ContentsΒΆ

management.views.settings.LOG_LEVELS = ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'][source]ΒΆ
class management.views.settings.SettingsView(security_feature=None, *args, **kwargs)[source]ΒΆ

Bases: trustpoint.page_context.PageContextMixin, management.security.mixins.SecurityLevelMixin, django.views.generic.edit.FormView

Mixin which adds data to the context for the devices application.

Parameters:

security_feature (management.security.SecurityFeature)

template_name = 'management/settings.html'[source]ΒΆ
form_class[source]ΒΆ
success_url[source]ΒΆ
page_category = 'management'[source]ΒΆ
page_name = 'settings'[source]ΒΆ
get_form_kwargs()[source]ΒΆ

Return the keyword arguments for instantiating the form.

form_valid(form)[source]ΒΆ

If the form is valid, redirect to the supplied URL.

Parameters:

form (management.forms.SecurityConfigForm)

form_invalid(form)[source]ΒΆ

If the form is invalid, render the invalid form.

Parameters:

form (management.forms.SecurityConfigForm)

get_context_data(**kwargs)[source]ΒΆ

Adds the page category and page_name for the device pages.

Parameters:

kwargs (dict) – The keyword arguments are passed to super().get_context_data() if it exists. Otherwise, kwargs is returned with the added page_category.

Returns:

The context data including the page_category information.

Return type:

dict[str, Any]

class management.views.settings.ChangeLogLevelView(**kwargs)[source]ΒΆ

Bases: django.views.View

Intentionally simple parent class for all views. Only implements dispatch-by-method and simple sanity checking.

post(request)[source]ΒΆ