summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--LICENSE (renamed from docs/LICENSE.rst)0
-rw-r--r--README.rst46
-rw-r--r--__init__.py (renamed from helsinki/program/templatetags/__init__.py)0
-rw-r--r--helsinki/__init__.py6
-rw-r--r--helsinki/program/search_sites.py2
-rw-r--r--helsinki/program/templates/search/indexes/program/note_text.txt2
-rw-r--r--helsinki/program/templates/search/indexes/program/show_text.txt3
-rw-r--r--helsinki/program/urls_program.py35
-rwxr-xr-xmanage.py (renamed from helsinki/program/manage.py)0
-rw-r--r--program/__init__.py (renamed from helsinki/program/__init__.py)0
-rw-r--r--program/admin.py (renamed from helsinki/program/admin.py)0
-rw-r--r--program/fixtures/broadcastformats.yaml (renamed from helsinki/program/fixtures/broadcastformats.yaml)0
-rw-r--r--program/fixtures/hosts.yaml (renamed from helsinki/program/fixtures/hosts.yaml)0
-rw-r--r--program/fixtures/musicfocus.yaml (renamed from helsinki/program/fixtures/musicfocus.yaml)0
-rw-r--r--program/fixtures/rrules.yaml (renamed from helsinki/program/fixtures/rrules.yaml)0
-rw-r--r--program/fixtures/showinformation.yaml (renamed from helsinki/program/fixtures/showinformation.yaml)0
-rw-r--r--program/fixtures/shows.yaml (renamed from helsinki/program/fixtures/shows.yaml)0
-rw-r--r--program/fixtures/showtopics.yaml (renamed from helsinki/program/fixtures/showtopics.yaml)0
-rw-r--r--program/management/__init__.py (renamed from helsinki/program/management/commands/__init__.py)0
-rw-r--r--program/management/commands/__init__.py (renamed from helsinki/program/management/__init__.py)0
-rw-r--r--program/management/commands/importhosts.py (renamed from helsinki/program/management/commands/importhosts.py)2
-rw-r--r--program/management/commands/importnotes.py (renamed from helsinki/program/management/commands/importnotes.py)2
-rw-r--r--program/management/commands/importprogramslots.py (renamed from helsinki/program/management/commands/importprogramslots.py)2
-rw-r--r--program/management/commands/importshows.py (renamed from helsinki/program/management/commands/importshows.py)2
-rw-r--r--program/models.py (renamed from helsinki/program/models.py)0
-rw-r--r--program/search_indexes.py (renamed from helsinki/program/search_indexes.py)6
-rw-r--r--program/templatetags/__init__.py (renamed from docs/CHANGES.rst)0
-rw-r--r--program/templatetags/content_boxes.py (renamed from helsinki/program/templatetags/content_boxes.py)16
-rw-r--r--program/urls.py35
-rw-r--r--program/views.py (renamed from helsinki/program/views.py)15
-rw-r--r--requirements.txt7
-rw-r--r--search_sites.py2
-rw-r--r--settings.py (renamed from helsinki/program/settings.py)33
-rw-r--r--setup.py35
-rw-r--r--site_media/styles/base.css (renamed from helsinki/program/site_media/styles/base.css)0
-rw-r--r--templates/404.html (renamed from helsinki/program/templates/404.html)0
-rw-r--r--templates/500.html (renamed from helsinki/program/templates/500.html)0
-rw-r--r--templates/base.html (renamed from helsinki/program/templates/base.html)0
-rw-r--r--templates/program/boxes/broadcastformat.html (renamed from helsinki/program/templates/program/box_broadcastformat.html)2
-rw-r--r--templates/program/boxes/current.html (renamed from helsinki/program/templates/program/current_box.html)0
-rw-r--r--templates/program/boxes/musicfocus.html (renamed from helsinki/program/templates/program/box_musicfocus.html)2
-rw-r--r--templates/program/boxes/recommendations.html (renamed from helsinki/program/templates/program/recommendations_box.html)0
-rw-r--r--templates/program/boxes/showinformation.html (renamed from helsinki/program/templates/program/box_showinformation.html)2
-rw-r--r--templates/program/boxes/showtopic.html (renamed from helsinki/program/templates/program/box_showtopic.html)2
-rw-r--r--templates/program/day_schedule.html (renamed from helsinki/program/templates/program/day_schedule.html)0
-rw-r--r--templates/program/host_detail.html (renamed from helsinki/program/templates/program/host_detail.html)0
-rw-r--r--templates/program/host_list.html (renamed from helsinki/program/templates/program/host_list.html)0
-rw-r--r--templates/program/recommendations.html (renamed from helsinki/program/templates/program/recommendations.html)0
-rw-r--r--templates/program/show_detail.html (renamed from helsinki/program/templates/program/show_detail.html)3
-rw-r--r--templates/program/show_list.html (renamed from helsinki/program/templates/program/show_list.html)0
-rw-r--r--templates/program/timeslot_detail.html (renamed from helsinki/program/templates/program/timeslot_detail.html)0
-rw-r--r--templates/program/week_schedule.html (renamed from helsinki/program/templates/program/week_schedule.html)0
-rw-r--r--templates/search/indexes/program/note_SearchableText.txt (renamed from helsinki/program/templates/search/indexes/program/note_SearchableText.txt)0
-rw-r--r--templates/search/indexes/program/show_SearchableText.txt (renamed from helsinki/program/templates/search/indexes/program/show_SearchableText.txt)0
-rw-r--r--urls.py (renamed from helsinki/program/urls.py)6
56 files changed, 118 insertions, 153 deletions
diff --git a/.gitignore b/.gitignore
index 3011f78..eb29dcd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
*.pyc
-*.sqlite \ No newline at end of file
+dev_data.sqlite
+local_settings.py
diff --git a/docs/LICENSE.rst b/LICENSE
index 5596645..5596645 100644
--- a/docs/LICENSE.rst
+++ b/LICENSE
diff --git a/README.rst b/README.rst
index 0667df6..8480e0b 100644
--- a/README.rst
+++ b/README.rst
@@ -1,19 +1,39 @@
+=================================
Radio Helsinki Program Management
=================================
-Requirements
-------------
+Installation
+============
+
+To get setup you must have the following installed:
+
+ * Python 2.6
+ * virtualenv 1.5
+
+Setting up the environment
+--------------------------
+
+Create a virtual environment where the dependencies will live::
+
+ $ virtualenv --no-site-packages helsinki
+ $ source helsinki/bin/activate
+ (helsinki)$
+
+Install the project dependencies::
+
+ (helsinki)$ 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
-- Django 1.2.5: http://pypi.python.org/pypi/Django/1.2.5
-- PIL: http://pypi.python.org/pypi/PIL/1.1.6
-- python-dateutil: http://pypi.python.org/pypi/python-dateutil/1.5
-- PyYAML: http://pypi.python.org/pypi/PyYAML/3.09
-- MySQL-python: http://pypi.python.org/pypi/MySQL-python/1.2.3
-- django-haystack: http://pypi.python.org/pypi/django-haystack/1.1.0
-- pysolr: http://pypi.python.org/pypi/pysolr/2.0.13
+Running a web server
+--------------------
-Author
-------
+In development you should run::
-Ernesto Rico-Schmidt
-Contributions: Johannes Raggam
+ (helsinki)$ python manage.py runserver
diff --git a/helsinki/program/templatetags/__init__.py b/__init__.py
index e69de29..e69de29 100644
--- a/helsinki/program/templatetags/__init__.py
+++ b/__init__.py
diff --git a/helsinki/__init__.py b/helsinki/__init__.py
deleted file mode 100644
index f48ad10..0000000
--- a/helsinki/__init__.py
+++ /dev/null
@@ -1,6 +0,0 @@
-# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
-try:
- __import__('pkg_resources').declare_namespace(__name__)
-except ImportError:
- from pkgutil import extend_path
- __path__ = extend_path(__path__, __name__)
diff --git a/helsinki/program/search_sites.py b/helsinki/program/search_sites.py
deleted file mode 100644
index fe5127a..0000000
--- a/helsinki/program/search_sites.py
+++ /dev/null
@@ -1,2 +0,0 @@
-import haystack
-haystack.autodiscover() \ No newline at end of file
diff --git a/helsinki/program/templates/search/indexes/program/note_text.txt b/helsinki/program/templates/search/indexes/program/note_text.txt
deleted file mode 100644
index 2421b4f..0000000
--- a/helsinki/program/templates/search/indexes/program/note_text.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-{{ object.title }}
-{{ object.content }} \ No newline at end of file
diff --git a/helsinki/program/templates/search/indexes/program/show_text.txt b/helsinki/program/templates/search/indexes/program/show_text.txt
deleted file mode 100644
index f08b515..0000000
--- a/helsinki/program/templates/search/indexes/program/show_text.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-{{ object.name }}
-{{ object.description }}
-{{ object.short_description }} \ No newline at end of file
diff --git a/helsinki/program/urls_program.py b/helsinki/program/urls_program.py
deleted file mode 100644
index a93db83..0000000
--- a/helsinki/program/urls_program.py
+++ /dev/null
@@ -1,35 +0,0 @@
-from django.conf.urls.defaults import *
-
-from django.views.generic.list_detail import object_detail, object_list
-
-from models import BroadcastFormat, Host, Show, TimeSlot
-from views import current_show, day_schedule, recommendations, show_list, week_schedule
-
-host_dict = {
- 'queryset': Host.objects.all(),
- 'template_object_name': 'host'
-}
-show_dict = {
- 'queryset': Show.objects.all(),
- 'template_object_name': 'show'
-}
-timeslot_dict = {
- 'queryset': TimeSlot.objects.all(),
- 'template_object_name': 'timeslot'
-}
-recommendation_dict = {'template_name': 'program/recommendations_box.html'}
-
-urlpatterns = patterns('',
- (r'^today/?$', day_schedule),
- (r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/?$', day_schedule),
- (r'^(?P<year>\d{4})/(?P<week>\d{1,2})/?$', week_schedule),
- (r'^current_box/?$', current_show),
- (r'^hosts/?$', object_list, host_dict),
- url(r'^hosts/(?P<object_id>\d+)/?$', object_detail, host_dict, name='host-detail'),
- (r'^tips/?$', recommendations),
- (r'^tips_box/?$', recommendations, recommendation_dict),
- (r'^shows/?$', show_list),
- url(r'^shows/(?P<slug>[\w-]+)/?$', object_detail, show_dict, name='show-detail'),
- url(r'^(?P<object_id>\d+)/?$', object_detail, timeslot_dict, name='timeslot-detail'),
- (r'^week/?$', week_schedule)
-)
diff --git a/helsinki/program/manage.py b/manage.py
index 5e78ea9..5e78ea9 100755
--- a/helsinki/program/manage.py
+++ b/manage.py
diff --git a/helsinki/program/__init__.py b/program/__init__.py
index e69de29..e69de29 100644
--- a/helsinki/program/__init__.py
+++ b/program/__init__.py
diff --git a/helsinki/program/admin.py b/program/admin.py
index 6c64dd3..6c64dd3 100644
--- a/helsinki/program/admin.py
+++ b/program/admin.py
diff --git a/helsinki/program/fixtures/broadcastformats.yaml b/program/fixtures/broadcastformats.yaml
index 84fa335..84fa335 100644
--- a/helsinki/program/fixtures/broadcastformats.yaml
+++ b/program/fixtures/broadcastformats.yaml
diff --git a/helsinki/program/fixtures/hosts.yaml b/program/fixtures/hosts.yaml
index 4cccf3a..4cccf3a 100644
--- a/helsinki/program/fixtures/hosts.yaml
+++ b/program/fixtures/hosts.yaml
diff --git a/helsinki/program/fixtures/musicfocus.yaml b/program/fixtures/musicfocus.yaml
index 90de149..90de149 100644
--- a/helsinki/program/fixtures/musicfocus.yaml
+++ b/program/fixtures/musicfocus.yaml
diff --git a/helsinki/program/fixtures/rrules.yaml b/program/fixtures/rrules.yaml
index 4095e07..4095e07 100644
--- a/helsinki/program/fixtures/rrules.yaml
+++ b/program/fixtures/rrules.yaml
diff --git a/helsinki/program/fixtures/showinformation.yaml b/program/fixtures/showinformation.yaml
index cbde529..cbde529 100644
--- a/helsinki/program/fixtures/showinformation.yaml
+++ b/program/fixtures/showinformation.yaml
diff --git a/helsinki/program/fixtures/shows.yaml b/program/fixtures/shows.yaml
index f520b26..f520b26 100644
--- a/helsinki/program/fixtures/shows.yaml
+++ b/program/fixtures/shows.yaml
diff --git a/helsinki/program/fixtures/showtopics.yaml b/program/fixtures/showtopics.yaml
index 8f12508..8f12508 100644
--- a/helsinki/program/fixtures/showtopics.yaml
+++ b/program/fixtures/showtopics.yaml
diff --git a/helsinki/program/management/commands/__init__.py b/program/management/__init__.py
index 3aa4ca5..3aa4ca5 100644
--- a/helsinki/program/management/commands/__init__.py
+++ b/program/management/__init__.py
diff --git a/helsinki/program/management/__init__.py b/program/management/commands/__init__.py
index 3aa4ca5..3aa4ca5 100644
--- a/helsinki/program/management/__init__.py
+++ b/program/management/commands/__init__.py
diff --git a/helsinki/program/management/commands/importhosts.py b/program/management/commands/importhosts.py
index 39a8afd..a2abbd3 100644
--- a/helsinki/program/management/commands/importhosts.py
+++ b/program/management/commands/importhosts.py
@@ -2,7 +2,7 @@ from django.core.management.base import NoArgsCommand
import MySQLdb
-from helsinki.program.models import Host
+from models import Host
USER = 'helsinki'
PASSWD = 'helsinki'
diff --git a/helsinki/program/management/commands/importnotes.py b/program/management/commands/importnotes.py
index 19ddfed..48e047c 100644
--- a/helsinki/program/management/commands/importnotes.py
+++ b/program/management/commands/importnotes.py
@@ -5,7 +5,7 @@ from django.utils.html import clean_html, strip_tags
import MySQLdb
-from helsinki.program.models import Note, Show, TimeSlot
+from models import Note, Show, TimeSlot
USER = 'helsinki'
PASSWD = 'helsinki'
diff --git a/helsinki/program/management/commands/importprogramslots.py b/program/management/commands/importprogramslots.py
index 52aa73a..86e3038 100644
--- a/helsinki/program/management/commands/importprogramslots.py
+++ b/program/management/commands/importprogramslots.py
@@ -5,7 +5,7 @@ from django.utils.html import strip_tags
from datetime import time
import MySQLdb
-from helsinki.program.models import Show, ProgramSlot, RRule
+from models import Show, ProgramSlot, RRule
USER = 'helsinki'
PASSWD = 'helsinki'
diff --git a/helsinki/program/management/commands/importshows.py b/program/management/commands/importshows.py
index b013dab..0f619b5 100644
--- a/helsinki/program/management/commands/importshows.py
+++ b/program/management/commands/importshows.py
@@ -5,7 +5,7 @@ from django.utils.html import clean_html, strip_tags
import MySQLdb
-from helsinki.program.models import BroadcastFormat, Host, Show
+from models import BroadcastFormat, Host, Show
USER = 'helsinki'
PASSWD = 'helsinki'
diff --git a/helsinki/program/models.py b/program/models.py
index 5f0f835..5f0f835 100644
--- a/helsinki/program/models.py
+++ b/program/models.py
diff --git a/helsinki/program/search_indexes.py b/program/search_indexes.py
index 745f379..4b0cf74 100644
--- a/helsinki/program/search_indexes.py
+++ b/program/search_indexes.py
@@ -1,9 +1,7 @@
-from haystack.indexes import CharField, DateTimeField, SearchIndex
+from haystack.indexes import CharField, SearchIndex
from haystack import site
-from datetime import datetime
-
-from program.models import Note, Show
+from models import Note, Show
class NoteIndex(SearchIndex):
SearchableText = CharField(document=True, use_template=True)
diff --git a/docs/CHANGES.rst b/program/templatetags/__init__.py
index e69de29..e69de29 100644
--- a/docs/CHANGES.rst
+++ b/program/templatetags/__init__.py
diff --git a/helsinki/program/templatetags/content_boxes.py b/program/templatetags/content_boxes.py
index 56c0afb..7108c5a 100644
--- a/helsinki/program/templatetags/content_boxes.py
+++ b/program/templatetags/content_boxes.py
@@ -1,30 +1,26 @@
-# http://docs.djangoproject.com/en/dev/howto/custom-template-tags/
+# http://docs.djangoproject.com/en/1.2/howto/custom-template-tags/
from django import template
register = template.Library()
-from helsinki.program.models import (
- BroadcastFormat,
- MusicFocus,
- ShowInformation,
- ShowTopic)
+from program.models import BroadcastFormat, MusicFocus, ShowInformation, ShowTopic
-@register.inclusion_tag('program/box_broadcastformat.html')
+@register.inclusion_tag('program/boxes/broadcastformat.html')
def broadcastformat():
broadcastformats = BroadcastFormat.objects.all()
return {'broadcastformats': broadcastformats}
-@register.inclusion_tag('program/box_musicfocus.html')
+@register.inclusion_tag('program/boxes/musicfocus.html')
def musicfocus():
musicfoci = MusicFocus.objects.all()
return {'musicfoci': musicfoci}
-@register.inclusion_tag('program/box_showinformation.html')
+@register.inclusion_tag('program/boxes/showinformation.html')
def showinformation():
showinformations = ShowInformation.objects.all()
return {'showinformations': showinformations}
-@register.inclusion_tag('program/box_showtopic.html')
+@register.inclusion_tag('program/boxes/showtopic.html')
def showtopic():
showtopics = ShowTopic.objects.all()
return {'showtopics': showtopics}
diff --git a/program/urls.py b/program/urls.py
new file mode 100644
index 0000000..b9df496
--- /dev/null
+++ b/program/urls.py
@@ -0,0 +1,35 @@
+from django.conf.urls.defaults import patterns, url
+
+from django.views.generic.list_detail import object_detail, object_list
+
+from models import Host, Show, TimeSlot
+from views import current_show, day_schedule, recommendations, show_list, week_schedule
+
+hosts_dict = {
+ 'queryset': Host.objects.all(),
+ 'template_object_name': 'host'
+}
+shows_dict = {
+ 'queryset': Show.objects.all(),
+ 'template_object_name': 'show'
+}
+timeslots_dict = {
+ 'queryset': TimeSlot.objects.all(),
+ 'template_object_name': 'timeslot'
+}
+recommendations_dict = {'template_name': 'program/boxes/recommendations.html'}
+
+urlpatterns = patterns('',
+ url(r'^today/?$', day_schedule),
+ url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/?$', day_schedule),
+ url(r'^(?P<year>\d{4})/(?P<week>\d{1,2})/?$', week_schedule),
+ url(r'^current_box/?$', current_show),
+ url(r'^hosts/?$', object_list, hosts_dict),
+ url(r'^hosts/(?P<object_id>\d+)/?$', object_detail, hosts_dict, name='host-detail'),
+ url(r'^tips/?$', recommendations),
+ url(r'^tips_box/?$', recommendations, recommendations_dict),
+ url(r'^shows/?$', show_list),
+ url(r'^shows/(?P<slug>[\w-]+)/?$', object_detail, shows_dict, name='show-detail'),
+ url(r'^(?P<object_id>\d+)/?$', object_detail, timeslots_dict, name='timeslot-detail'),
+ url(r'^week/?$', week_schedule)
+)
diff --git a/helsinki/program/views.py b/program/views.py
index a9c7b67..59e8fdf 100644
--- a/helsinki/program/views.py
+++ b/program/views.py
@@ -1,20 +1,11 @@
-from django.views.generic import list_detail
-from django.views.generic import simple
+from django.views.generic import list_detail, simple
from django.shortcuts import get_object_or_404
-from helsinki.program.models import (
- BroadcastFormat,
- MusicFocus,
- Note,
- Show,
- ShowInformation,
- ShowTopic,
- TimeSlot)
+from models import BroadcastFormat, MusicFocus, Note, Show, ShowInformation, ShowTopic, TimeSlot
from datetime import date, datetime, time, timedelta
def show_list(request):
-
if 'broadcastformat' in request.GET:
broadcastformat = get_object_or_404(BroadcastFormat, slug=request.GET['broadcastformat'])
@@ -72,7 +63,7 @@ def current_show(request):
extra_context = dict(current=current, next=next, after_next=after_next)
- return simple.direct_to_template(request, template='program/current_box.html', extra_context=extra_context)
+ return simple.direct_to_template(request, template='program/boxes/current.html', extra_context=extra_context)
def week_schedule(request, year=None, week=None):
if year is None and week is None:
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..32201d5
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,7 @@
+Django==1.2.5
+MySQL-python==1.2.3
+PIL==1.1.7
+PyYAML==3.09
+django-haystack==1.1.0
+pysolr==2.0.13
+python-dateutil==1.5
diff --git a/search_sites.py b/search_sites.py
new file mode 100644
index 0000000..e8d4e13
--- /dev/null
+++ b/search_sites.py
@@ -0,0 +1,2 @@
+import haystack
+haystack.autodiscover()
diff --git a/helsinki/program/settings.py b/settings.py
index 036fe3e..a48b53e 100644
--- a/helsinki/program/settings.py
+++ b/settings.py
@@ -1,22 +1,19 @@
-import os
-
# Django settings for helsinki project.
+import os.path
+PROJECT_DIR = os.path.dirname(__file__)
+
DEBUG = True
TEMPLATE_DEBUG = DEBUG
-ADMINS = (
- # ('Your Name', 'your_email@example.com'),
-)
+ADMINS = ( )
MANAGERS = ADMINS
DATABASES = {
'default': {
- 'ENGINE': 'django.db.backends.mysql',
- 'NAME': 'helsinki2',
- 'USER': 'helsinki',
- 'PASSWORD': 'helsinki'
+ 'ENGINE': 'django.db.backends.sqlite3',
+ 'NAME': os.path.join(PROJECT_DIR, 'dev_data.sqlite'),
}
}
@@ -27,16 +24,14 @@ LANGUAGE_CODE = 'de'
SITE_ID = 1
USE_I18N = True
-
USE_L10N = True
MEDIA_ROOT = ''
-
MEDIA_URL = ''
ADMIN_MEDIA_PREFIX = '/media/'
-SECRET_KEY = 'oepk-$!=)c)7+y%cdz-x46_h5bp!o-*9%dv!(sf=3r4zfqk_(t'
+SECRET_KEY = ''
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
@@ -52,10 +47,10 @@ MIDDLEWARE_CLASSES = (
'django.contrib.messages.middleware.MessageMiddleware',
)
-ROOT_URLCONF = 'helsinki.program.urls'
+ROOT_URLCONF = 'helsinki.urls'
TEMPLATE_DIRS = (
- os.path.join(os.path.dirname(__file__), "templates"),
+ os.path.join(PROJECT_DIR, "templates"),
)
INSTALLED_APPS = (
@@ -65,12 +60,16 @@ INSTALLED_APPS = (
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.admin',
- 'helsinki.program',
+ 'program',
'haystack',
)
-HAYSTACK_SITECONF = 'helsinki.program.search_sites'
+HAYSTACK_SITECONF = 'helsinki.search_sites'
HAYSTACK_SEARCH_ENGINE = 'solr'
HAYSTACK_SOLR_URL = 'http://localhost:8988/solr'
-# plone integration
HAYSTACK_ID_FIELD = 'docid'
+
+try:
+ from local_settings import *
+except ImportError:
+ pass
diff --git a/setup.py b/setup.py
deleted file mode 100644
index 767fcc2..0000000
--- a/setup.py
+++ /dev/null
@@ -1,35 +0,0 @@
-from setuptools import setup, find_packages
-import os
-
-version = '0.1'
-
-setup(name='helsinki.program',
- version=version,
- description="Program Management for Radio Helsinki, Graz",
- long_description=open("README.rst").read() + "\n" +
- open(os.path.join("docs", "CHANGES.rst")).read(),
- # Get more strings from http://www.python.org/pypi?:action=list_classifiers
- classifiers=[
- "Programming Language :: Python",
- "Topic :: Software Development :: Libraries :: Python Modules",
- ],
- keywords='django radio',
- author='Ernesto Rico-Schmidt',
- author_email='',
- url='https://github.com/nnrcschmdt/helsinki/',
- license='GPL',
- packages=find_packages(exclude=['ez_setup']),
- namespace_packages=['helsinki',],
- include_package_data=True,
- zip_safe=False,
- install_requires=[
- 'setuptools',
- # -*- Extra requirements: -*-
- 'Django',
- 'python-dateutil',
- 'PyYAML',
- 'MySQL-python',
- 'django-haystack',
- 'pysolr'
- ],
-)
diff --git a/helsinki/program/site_media/styles/base.css b/site_media/styles/base.css
index 51194b1..51194b1 100644
--- a/helsinki/program/site_media/styles/base.css
+++ b/site_media/styles/base.css
diff --git a/helsinki/program/templates/404.html b/templates/404.html
index 6281ba0..6281ba0 100644
--- a/helsinki/program/templates/404.html
+++ b/templates/404.html
diff --git a/helsinki/program/templates/500.html b/templates/500.html
index 98074ab..98074ab 100644
--- a/helsinki/program/templates/500.html
+++ b/templates/500.html
diff --git a/helsinki/program/templates/base.html b/templates/base.html
index 2ed539e..2ed539e 100644
--- a/helsinki/program/templates/base.html
+++ b/templates/base.html
diff --git a/helsinki/program/templates/program/box_broadcastformat.html b/templates/program/boxes/broadcastformat.html
index 20e914f..3ae00e1 100644
--- a/helsinki/program/templates/program/box_broadcastformat.html
+++ b/templates/program/boxes/broadcastformat.html
@@ -3,7 +3,7 @@
<dt class="portletHeader"><span>Legende<span></dt>
{% for broadcastformat in broadcastformats %}
<dd class="portletItem bcformat bf-{{ broadcastformat.slug }}">
- <a href="?broadcastformat={{ broadcastformat.slug }}">{{ broadcastformat.format }}</a>
+ <a href="../?broadcastformat={{ broadcastformat.slug }}">{{ broadcastformat.format }}</a>
</dd>
{% endfor %}
</dl>
diff --git a/helsinki/program/templates/program/current_box.html b/templates/program/boxes/current.html
index a2341d3..a2341d3 100644
--- a/helsinki/program/templates/program/current_box.html
+++ b/templates/program/boxes/current.html
diff --git a/helsinki/program/templates/program/box_musicfocus.html b/templates/program/boxes/musicfocus.html
index da2c90f..7b78f81 100644
--- a/helsinki/program/templates/program/box_musicfocus.html
+++ b/templates/program/boxes/musicfocus.html
@@ -5,7 +5,7 @@
<ul>
{% for item in musicfoci %}
<li class="mf-{{ item.abbrev }}">
- <a href="?musicfocus={{ item.slug }}">{{ item }}</a>
+ <a href="../?musicfocus={{ item.slug }}">{{ item }}</a>
</li>
{% endfor %}
</ul>
diff --git a/helsinki/program/templates/program/recommendations_box.html b/templates/program/boxes/recommendations.html
index abcbe03..abcbe03 100644
--- a/helsinki/program/templates/program/recommendations_box.html
+++ b/templates/program/boxes/recommendations.html
diff --git a/helsinki/program/templates/program/box_showinformation.html b/templates/program/boxes/showinformation.html
index a3171d0..bff9486 100644
--- a/helsinki/program/templates/program/box_showinformation.html
+++ b/templates/program/boxes/showinformation.html
@@ -5,7 +5,7 @@
<ul>
{% for item in showinformations %}
<li class="si-{{ item.abbrev }}">
- <a href="?showinformation={{ item.slug }}">{{ item }}</a>
+ <a href="../?showinformation={{ item.slug }}">{{ item }}</a>
</li>
{% endfor %}
</ul>
diff --git a/helsinki/program/templates/program/box_showtopic.html b/templates/program/boxes/showtopic.html
index 79e9519..b545476 100644
--- a/helsinki/program/templates/program/box_showtopic.html
+++ b/templates/program/boxes/showtopic.html
@@ -5,7 +5,7 @@
<ul>
{% for item in showtopics %}
<li class="st-{{ item.abbrev }}">
- <a href="?showtopic={{ item.slug }}">{{ item }}</a>
+ <a href="../?showtopic={{ item.slug }}">{{ item }}</a>
</li>
{% endfor %}
</ul>
diff --git a/helsinki/program/templates/program/day_schedule.html b/templates/program/day_schedule.html
index a0e1ac4..a0e1ac4 100644
--- a/helsinki/program/templates/program/day_schedule.html
+++ b/templates/program/day_schedule.html
diff --git a/helsinki/program/templates/program/host_detail.html b/templates/program/host_detail.html
index d28f582..d28f582 100644
--- a/helsinki/program/templates/program/host_detail.html
+++ b/templates/program/host_detail.html
diff --git a/helsinki/program/templates/program/host_list.html b/templates/program/host_list.html
index 9b83b29..9b83b29 100644
--- a/helsinki/program/templates/program/host_list.html
+++ b/templates/program/host_list.html
diff --git a/helsinki/program/templates/program/recommendations.html b/templates/program/recommendations.html
index 85ec16e..85ec16e 100644
--- a/helsinki/program/templates/program/recommendations.html
+++ b/templates/program/recommendations.html
diff --git a/helsinki/program/templates/program/show_detail.html b/templates/program/show_detail.html
index 0238ad3..7614496 100644
--- a/helsinki/program/templates/program/show_detail.html
+++ b/templates/program/show_detail.html
@@ -40,11 +40,10 @@
<div id="hosts">
{% for host in show.hosts.all %}
- <div class="host">{{ host }}</div>
+ <div class="host"><a href="{% url host-detail host.id %}">{{ host }}</a></div>
{% endfor %}
</div>
-
<div id="description">{{ show.description|safe }}</div>
{% if show.email %}
diff --git a/helsinki/program/templates/program/show_list.html b/templates/program/show_list.html
index 6fe6525..6fe6525 100644
--- a/helsinki/program/templates/program/show_list.html
+++ b/templates/program/show_list.html
diff --git a/helsinki/program/templates/program/timeslot_detail.html b/templates/program/timeslot_detail.html
index 04d56c2..04d56c2 100644
--- a/helsinki/program/templates/program/timeslot_detail.html
+++ b/templates/program/timeslot_detail.html
diff --git a/helsinki/program/templates/program/week_schedule.html b/templates/program/week_schedule.html
index 76aed5a..76aed5a 100644
--- a/helsinki/program/templates/program/week_schedule.html
+++ b/templates/program/week_schedule.html
diff --git a/helsinki/program/templates/search/indexes/program/note_SearchableText.txt b/templates/search/indexes/program/note_SearchableText.txt
index 2421b4f..2421b4f 100644
--- a/helsinki/program/templates/search/indexes/program/note_SearchableText.txt
+++ b/templates/search/indexes/program/note_SearchableText.txt
diff --git a/helsinki/program/templates/search/indexes/program/show_SearchableText.txt b/templates/search/indexes/program/show_SearchableText.txt
index f08b515..f08b515 100644
--- a/helsinki/program/templates/search/indexes/program/show_SearchableText.txt
+++ b/templates/search/indexes/program/show_SearchableText.txt
diff --git a/helsinki/program/urls.py b/urls.py
index f90a332..27fbf2e 100644
--- a/helsinki/program/urls.py
+++ b/urls.py
@@ -2,18 +2,18 @@ from django.conf import settings
from django.conf.urls.defaults import *
from django.contrib import admin
-import os
+import os.path
admin.autodiscover()
urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
- (r'^program/', include('helsinki.program.urls_program')),
+ (r'^program/', include('program.urls')),
)
if settings.DEBUG:
urlpatterns += patterns('',
(r'^site_media/(?P<path>.*)$',
'django.views.static.serve',
- {'document_root': os.path.join(os.path.dirname(__file__), 'site_media')}
+ {'document_root': os.path.join(settings.PROJECT_DIR, 'site_media')}
),
)