diff --git a/LICENSE b/LICENSE index 5596645ed2d30080248925635481889db080300a..ecde97c640ad5ad94a051c0bf19e4a266736b690 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2011, Ernesto Rico-Schmidt +Copyright (c) 2011-2014, Ernesto Rico-Schmidt All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/README.rst b/README.rst index 674be8703ba0c7fe3b6b4cd0e205a8b555e7ed76..de16aff72f3713c1641455eb8a3a0d8b97961644 100644 --- a/README.rst +++ b/README.rst @@ -10,30 +10,33 @@ To get setup you must have the following installed: * Python 2.7 * virtualenv 1.11 + Setting up the environment -------------------------- Create a virtual environment where the dependencies will live:: - $ virtualenv --no-site-packages helsinki - $ source helsinki/bin/activate - (helsinki)$ + $ virtualenv -p python2.7 python + $ source python/bin/activate + (python)$ Install the project dependencies:: - (helsinki)$ pip install -r requirements.txt + (python)$ pip install -r requirements.txt + Setting up the database ----------------------- By default the project is set up to run on a SQLite database. You can run:: - (helsinki)$ python manage.py syncdb - (helsinki)$ python manage.py loaddata program/fixtures/*.yaml + (python)$ python manage.py syncdb + (python)$ python manage.py loaddata program/fixtures/*.yaml + Running a web server -------------------- In development you should run:: - (helsinki)$ python manage.py runserver + (python)$ python manage.py runserver diff --git a/program/utils.py b/program/utils.py index 5798c11a2311267150eb79f41d0466d45bee0cc8..cdc6a0930da3c2d3d6bcab7e572055a3042cbec0 100644 --- a/program/utils.py +++ b/program/utils.py @@ -3,7 +3,11 @@ 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 + base_url = getattr(settings, 'AUTOMATION_BASE_URL', None) + shows = [] + if base_url: + shows_list = json.load(urllib.urlopen(base_url))['shows'] + shows = [(s['id'], s['title']) for s in shows_list] + return shows diff --git a/pv/templates/program/show_detail.html b/pv/templates/program/show_detail.html index c75b32201040cf4f1f33bd48ef504375e17e3c7e..0f4b302743ef79d32337b12d4d1518fb752489bc 100644 --- a/pv/templates/program/show_detail.html +++ b/pv/templates/program/show_detail.html @@ -67,7 +67,10 @@ <h2>Sendungstipps</h2> <ul class="recommendations-list"> {% for note in show.notes.all reversed %} - <li><a href="{% url timeslot-detail note.timeslot.id %}" title="{{ note.title }}">{{ note.start|date:"d. M Y" }}:</a> {{ note.title }}</li> + <li> + <a href="{% url timeslot-detail note.timeslot.id %}" title="{{ note.title }}">{{ note.start|date:"d. M Y" }}:</a> + <div class="title">{{ note.title }}</div> + </li> {% endfor %} </ul> {% endif %}