Target Lists¶
Target lists are a way for you to group your Targets
together. This can be for any number of purposes, including
creating an observing list, grouping similar targets for further analysis, or simply for organizational purposes.
You can group Targets
through the API or from the ‘Target Groupings’ page in the TOM.
- tom_targets.groups.add_all_to_grouping(filter_data, grouping_object, request)¶
Adds all targets displayed by a particular filter to a
TargetList
. Successes, warnings, and errors result in messages being added to the request with the appropriate message level.- Parameters:
filter_data (django.http.QueryDict) – target filter data passed to the calling view
grouping_object (TargetList) –
TargetList
to add targets torequest (HTTPRequest) – request object passed to the calling view
- tom_targets.groups.add_selected_to_grouping(targets_ids, grouping_object, request)¶
Adds all selected targets to a
TargetList
. Successes, warnings, and errors result in messages being added to the request with the appropriate message level.- Parameters:
targets_ids (list) – list of selected targets
grouping_object (TargetList) –
TargetList
to add targets torequest (HTTPRequest) – request object passed to the calling view
- tom_targets.groups.remove_all_from_grouping(filter_data, grouping_object, request)¶
Removes all targets displayed by a particular filter from a
TargetList
. Successes, warnings, and errors result in messages being added to the request with the appropriate message level.- Parameters:
filter_data (django.http.QueryDict) – target filter data passed to the calling view
grouping_object (TargetList) –
TargetList
to remove targets fromrequest (HTTPRequest) – request object passed to the calling view
- tom_targets.groups.remove_selected_from_grouping(targets_ids, grouping_object, request)¶
Removes all targets displayed by a particular filter from a
TargetList
. Successes, warnings, and errors result in messages being added to the request with the appropriate message level.- Parameters:
targets_ids (list) – list of selected targets
grouping_object (TargetList) –
TargetList
to remove targets fromrequest (HTTPRequest) – request object passed to the calling view
- tom_targets.groups.move_all_to_grouping(filter_data, grouping_object, request)¶
Moves all targets displayed by a particular filter to a
TargetList
by removing all previous gropupings and then adding them to the supplied grouping_object. Successes, warnings, and errors result in messages being added to the request with the appropriate message level.- Parameters:
filter_data (django.http.QueryDict) – target filter data passed to the calling view
grouping_object (TargetList) –
TargetList
to add targets torequest (HTTPRequest) – request object passed to the calling view
- tom_targets.groups.move_selected_to_grouping(targets_ids, grouping_object, request)¶
Moves all selected targets to a
TargetList
by removing them from their previous groupings and then adding them to the supplied grouping_object. Successes, warnings, and errors result in messages being added to the request with the appropriate message level.- Parameters:
targets_ids (list) – list of selected targets
grouping_object (TargetList) –
TargetList
to add targets torequest (HTTPRequest) – request object passed to the calling view