summaryrefslogtreecommitdiff
path: root/program/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'program/utils.py')
-rw-r--r--program/utils.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/program/utils.py b/program/utils.py
new file mode 100644
index 0000000..5798c11
--- /dev/null
+++ b/program/utils.py
@@ -0,0 +1,9 @@
+from django.conf import settings
+
+import json
+import urllib
+
+def get_automation_id_choices():
+ shows_list = json.load(urllib.urlopen(settings.AUTOMATION_BASE_URL))['shows']
+ shows = [(s['id'], s['title']) for s in shows_list]
+ return shows \ No newline at end of file