geonode.management_commands_http.views

Classes

ManagementCommandView

Handle the exposed management commands usage:

ManagementCommandJobViewSet

Create, List, Retrieve, Start, Stop and Get Status of a Management Command Job.

Module Contents

class geonode.management_commands_http.views.ManagementCommandView[source]

Bases: rest_framework.views.APIView, geonode.management_commands_http.mixins.CreateJobMixin

Handle the exposed management commands usage:
  • GET: List of exposed commands

  • GET detail: Help for a specific command

  • POST: Create a job (and automatic runs) for a specific command.

permission_classes[source]
allowed_methods = ['GET', 'POST'][source]
retrieve_details(cmd_name)[source]
list()[source]
get(request, cmd_name=None)[source]
post(request, cmd_name=None)[source]

Creates and runs a management command job.

Expects application/json content type in the following shape:

{
    "args": ["<arg1>", "<arg2>"],
    "kwargs": {"<key1": "<val1>", "<key2>": "<val2>"},
    "autostart": true
}

By default, autostart is set to true.

get_serializer(*args, **kwargs)[source]
class geonode.management_commands_http.views.ManagementCommandJobViewSet[source]

Bases: geonode.management_commands_http.mixins.CreateJobMixin, rest_framework.mixins.RetrieveModelMixin, rest_framework.viewsets.GenericViewSet

Create, List, Retrieve, Start, Stop and Get Status of a Management Command Job.

permission_classes[source]
queryset[source]
serializer_class[source]
filter_class[source]
filter_backends[source]
pagination_class[source]
get_queryset()[source]
get_serializer_class()[source]
list(request, *args, **kwargs)[source]
start(request, pk=None, **kwargs)[source]
stop(request, pk=None, **kwargs)[source]
status(request, pk=None, **kwargs)[source]