From 30f04220ebceb54279ad81c39c4c4cfffc5d96a4 Mon Sep 17 00:00:00 2001 From: Ernesto Rico-Schmidt Date: Fri, 31 Jan 2014 21:17:44 +0100 Subject: added project path to wsgi python path diff --git a/helsinki/wsgi.py b/helsinki/wsgi.py index 3d00c6a..36d57d6 100644 --- a/helsinki/wsgi.py +++ b/helsinki/wsgi.py @@ -13,7 +13,9 @@ middleware here, or combine a Django application with an application of another framework. """ -import os +import os, sys + +sys.path.append('/var/www/pv/helsinki') os.environ.setdefault("DJANGO_SETTINGS_MODULE", "helsinki.settings") -- cgit v0.10.2 From 995873b6d2cf871780cb7f026cb183620f49e4cf Mon Sep 17 00:00:00 2001 From: Johannes Raggam Date: Fri, 7 Feb 2014 14:51:23 +0100 Subject: update README install instructions diff --git a/README.rst b/README.rst index 674be87..de16aff 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 -- cgit v0.10.2 From d054b80bffb26106e81d606a6ffaab56dea81a47 Mon Sep 17 00:00:00 2001 From: Johannes Raggam Date: Fri, 7 Feb 2014 14:52:03 +0100 Subject: dont err when AUTOMATION_BASE_URL isnt set diff --git a/program/utils.py b/program/utils.py index 5798c11..cdc6a09 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 -- cgit v0.10.2 From 902cc6cfbef3f50268f73dc8690295bf2d556e30 Mon Sep 17 00:00:00 2001 From: Johannes Raggam Date: Fri, 7 Feb 2014 14:53:10 +0100 Subject: towards nicer styling. styles are in github.com/thet/helsinki-theme at the moment diff --git a/helsinki/templates/program/show_detail.html b/helsinki/templates/program/show_detail.html index c75b322..0f4b302 100644 --- a/helsinki/templates/program/show_detail.html +++ b/helsinki/templates/program/show_detail.html @@ -67,7 +67,10 @@

Sendungstipps

{% endif %} -- cgit v0.10.2