onadata.apps.restservice package

Subpackages

Submodules

onadata.apps.restservice.RestServiceInterface module

Base class.

class onadata.apps.restservice.RestServiceInterface.RestServiceInterface

Bases: object

RestServiceInterface base class.

send(url, data=None)

The class method to implement when sending data.

onadata.apps.restservice.forms module

restservice forms.

class onadata.apps.restservice.forms.RestServiceForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)

Bases: Form

RestService form class.

base_fields = {'service_name': <django.forms.fields.CharField object>, 'service_url': <django.forms.fields.URLField object>}
declared_fields = {'service_name': <django.forms.fields.CharField object>, 'service_url': <django.forms.fields.URLField object>}
property media

Return all media required to render the widgets on this form.

onadata.apps.restservice.models module

RestService model

class onadata.apps.restservice.models.RestService(*args, **kwargs)

Bases: Model

Properties for an external service.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

active

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

date_created

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

date_modified

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_name_display(*, field=<django.db.models.fields.CharField: name>)
get_service_definition()

Returns ServiceDefinition class

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

inactive_reason

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

property long_name

Service verbose name.

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
service_url

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

xform

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

xform_id
onadata.apps.restservice.models.delete_merged_datasets_service(sender, instance, **kwargs)

Delete the service to the individual forms of a merged dataset.

onadata.apps.restservice.models.delete_metadata(sender, instance, **kwargs)

Delete related metadata on deletion of the RestService.

onadata.apps.restservice.models.propagate_merged_datasets(sender, instance, **kwargs)

Propagate the service to the individual forms of a merged dataset.

onadata.apps.restservice.tasks module

restservice async functions.

onadata.apps.restservice.utils module

restservice utility functions.

onadata.apps.restservice.utils.call_service(submission_instance)

Sends submissions to linked services.

onadata.apps.restservice.views module

restservice views.

onadata.apps.restservice.views.add_service(request, username, id_string)

Add a service.

onadata.apps.restservice.views.delete_service(request, username, id_string)

Delete a service view.

Module contents

restservice module.