management.views.notificationsΒΆ
Defines views for managing notifications.
Module ContentsΒΆ
- class management.views.notifications.RefreshNotificationsView(**kwargs)[source]ΒΆ
Bases:
trustpoint.logger.LoggerMixin,django.views.generic.TemplateViewView to execute all notifications and redirect back to dashboard.
- get(request, *args, **kwargs)[source]ΒΆ
Handles GET requests and redirects to the dashboard.
- Parameters:
request (django.http.HttpRequest) β The HTTP request object.
*args (Any) β Additional positional arguments.
**kwargs (Any) β Keyword arguments passed to super().get_context_data.
- Returns:
dashboard.
- Return type:
The response that redirects the user to home
- class management.views.notifications.NotificationDeleteView[source]ΒΆ
Bases:
trustpoint.logger.LoggerMixin,django.views.generic.DeleteView[management.models.NotificationModel,Any]View to delete a notification.
- delete(request, *args, **kwargs)[source]ΒΆ
Override delete method to add a success message.
- Parameters:
request (django.http.HttpRequest) β The HTTP request object.
*args (Any) β Additional positional arguments.
**kwargs (Any) β Keyword arguments passed to super().delete.
- Returns:
The HTTP response redirecting to success_url.
- Return type:
django.http.HttpResponse