TOMtoolkit module for reporting transients to the TNS
-
Install the package into your TOM environment:
pip install tom-tns
-
In your project
settings.py
, addtom_tns
to yourINSTALLED_APPS
setting:INSTALLED_APPS = [ ... 'tom_tns', ]
-
Add your TNS credentials to your
settings.py
if they don't already exist for the TNS Broker.If you don't have access to a TNS Bot for your TOM, you can make one from the TNS website.
NOTE: If you are testing on the sandbox, the sandbox is only synced every Sunday, so new bots created using the above link won't show up until after the next update.
BROKERS = { ... 'TNS': { 'bot_id': os.getenv('TNS_BOT_ID', ''), # This is the BOT ID you plan to use to submit to TNS 'bot_name': os.getenv('TNS_BOT_NAME', ''), # This is the BOT name associated with the above ID 'api_key': os.getenv('TNS_API_KEY', ''), # This is the API key for the associated BOT 'tns_base_url': 'https://sandbox.wis-tns.org/api', # This is the sandbox URL. Use https://www.wis-tns.org/api for live submission. 'group_names': ['bot_group', 'PI_group'], # Optional List. Include if you wish to use any affiliated Group Names when reporting. }, }
-
Include the tom_tns URLconf in your project
urls.py
:urlpatterns = [ ... path('tns/', include('tom_tns.urls', namespace='tns')), ]
Once configured, a TNS
button should appear below the Target Name.
NOTE: Users who are using tomtoolkit<2.15.12
will have to add the TNS button manually.