Utilities¶
-
tom_targets.utils.
export_targets
(qs)¶ Exports all the specified targets into a csv file in folder csvTargetFiles NOTE: This saves locally. To avoid this, create file buffer.
- Parameters
qs (QuerySet) – List of targets to export
- Returns
String buffer of exported targets
- Return type
StringIO
-
tom_targets.utils.
import_targets
(targets)¶ Imports a set of targets into the TOM and saves them to the database.
- Parameters
targets (StringIO) – String buffer of targets
- Returns
dictionary of successfully imported targets, as well errors
- Return type
dict