Views#
- class tom_dataservices.views.CreateTargetFromQueryView(**kwargs)[source]#
View that handles the creation of
Targetobjects from a Data Service Query result. Requires authentication.- post(request, *args, **kwargs)[source]#
Handles the POST requests to this view. Creates a
Targetfor each query result sent in the POST. Redirects to theTargetListViewif multiple targets were created, and theTargetUpdateViewif only one was created. Redirects to theRunQueryViewif noTargetobjects were successfully created.
- class tom_dataservices.views.DataServiceQueryCreateView(**kwargs)[source]#
View for creating a new query to a data service. Requires authentication.
- form_valid(form)[source]#
Saves the associated
DataServiceQueryand redirects to theDataServiceQuerylist.
- get_context_data(*args, **kwargs)[source]#
Adds any form partials to the context.
- Returns:
context
- Return type:
dict
- get_data_service_name()[source]#
Returns the data service specified in the request
- Returns:
DataService name
- Return type:
str
- get_form(form_class=None)[source]#
Returns an instance of the form to be used in this view.
- Returns:
Form instance
- Return type:
django.forms.Form
- class tom_dataservices.views.DataServiceQueryDeleteView(**kwargs)[source]#
View that handles the deletion of a saved
DataServiceQuery. Requires authentication.- model#
alias of
DataServiceQuery
- class tom_dataservices.views.DataServiceQueryFilterSet(
- data=None,
- queryset=None,
- *,
- request=None,
- prefix=None,
Defines the available fields for filtering the list of queries.
- class tom_dataservices.views.DataServiceQueryListView(**kwargs)[source]#
View that displays all saved
DataServiceQueryobjects.- filterset_class#
alias of
DataServiceQueryFilterSet
- get_context_data(*args, **kwargs)[source]#
Adds the data services available to the TOM to the context dictionary.
- Returns:
context
- Return type:
dict
- model#
alias of
DataServiceQuery
- class tom_dataservices.views.DataServiceQueryUpdateView(**kwargs)[source]#
View that handles the modification of a previously saved
DataServiceQuery. Requires authentication.- form_valid(form)[source]#
Saves the associated
DataServiceQueryif requested and redirects to theDataServiceQuerylist.
- get_context_data(*args, **kwargs)[source]#
Adds any form partials to the context.
- Returns:
context
- Return type:
dict
- get_form(form_class=None)[source]#
Returns an instance of the form to be used in this view.
- Returns:
Form instance
- Return type:
django.forms.Form
- get_form_class()[source]#
Returns the form class to use in this view. The form class will be the one defined in the specific data service module for which the query is being updated.