summaryrefslogtreecommitdiff
path: root/program/utils.py
blob: 5798c11a2311267150eb79f41d0466d45bee0cc8 (plain)
1
2
3
4
5
6
7
8
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