onadata.apps.restservice package

Submodules

onadata.apps.restservice.RestServiceInterface module

class onadata.apps.restservice.RestServiceInterface.RestServiceInterface

Bases: object

send(url, data=None)

onadata.apps.restservice.forms module

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: django.forms.forms.Form

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>}
media

onadata.apps.restservice.models module

RestService model

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

Bases: django.db.models.base.Model

Properties for an external service.

exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.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(**morekwargs)
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.

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

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

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

onadata.apps.restservice.utils module

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

onadata.apps.restservice.views module

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

Module contents