web.views.daemon_views.DaemonDetailWithDeleteView module

Module with the web.views.DaemonDetailWithDeleteView view.

class web.views.daemon_views.DaemonDetailWithDeleteView.DaemonDetailWithDeleteView(**kwargs)[source]

Bases: LoginRequiredMixin, DetailWithDeleteView, CustomActionMixin, TestActionMixin

View for a single core.models.Daemon instance.

URL_NAME = 'daemon-detail'
model

alias of Daemon

template_name = 'web/daemon/daemon_detail.html'
success_url = '/routines/'
get_queryset()[source]

Restricts the queryset to objects owned by the requesting user.

Return type:

QuerySet

post(request, *args, **kwargs)[source]

Creates response to a post request.

If no action matches the existing handlers, responds with Http204. Should be executed last in a custom view post method.

Parameters:
Return type:

HttpResponse

Returns:

The handlers response to the request. If no matching handler is found Http204.

Raises:

ImproperlyConfigured – If the called handler method does not return a django.http.HttpResponse.>

handle_start_daemon(request)[source]

Handler function for the start-daemon action.

Parameters:

request (HttpRequest) – The action request to handle.

Return type:

HttpResponse

Returns:

A template response with the updated view after the action.

handle_stop_daemon(request)[source]

Handler function for the stop-daemon action.

Parameters:

request (HttpRequest) – The action request to handle.

Return type:

HttpResponse

Returns:

A template response with the updated view after the action.