From 5504c0d926aabb2017e547bfbfbcf986ce5ee037 Mon Sep 17 00:00:00 2001 From: Johannes Raggam <raggam-nl@adm.at> Date: Sat, 26 Mar 2011 20:31:34 +0100 Subject: creating an egg pt1 diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 5596645..0000000 --- a/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011, Ernesto Rico-Schmidt -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above copyright notice, this -list of conditions and the following disclaimer in the documentation and/or -other materials provided with the distribution. - -Neither the name of the author nor the names of its contributors may be -used to endorse or promote products derived from this software without specific -prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/__init__.py b/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/docs/CHANGES.rst b/docs/CHANGES.rst new file mode 100644 index 0000000..e69de29 diff --git a/docs/LICENSE.rst b/docs/LICENSE.rst new file mode 100644 index 0000000..5596645 --- /dev/null +++ b/docs/LICENSE.rst @@ -0,0 +1,27 @@ +Copyright (c) 2011, Ernesto Rico-Schmidt +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +Redistributions in binary form must reproduce the above copyright notice, this +list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. + +Neither the name of the author nor the names of its contributors may be +used to endorse or promote products derived from this software without specific +prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/helsinki.program/manage.py b/helsinki.program/manage.py new file mode 100755 index 0000000..5e78ea9 --- /dev/null +++ b/helsinki.program/manage.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python +from django.core.management import execute_manager +try: + import settings # Assumed to be in the same directory. +except ImportError: + import sys + sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) + sys.exit(1) + +if __name__ == "__main__": + execute_manager(settings) diff --git a/helsinki.program/settings.py b/helsinki.program/settings.py new file mode 100644 index 0000000..ac4ad72 --- /dev/null +++ b/helsinki.program/settings.py @@ -0,0 +1,100 @@ +import os + +# Django settings for helsinki project. + +DEBUG = True +TEMPLATE_DEBUG = DEBUG + +ADMINS = ( + # ('Your Name', 'your_email@example.com'), +) + +MANAGERS = ADMINS + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.mysql', + 'NAME': 'helsinki2', + 'USER': 'helsinki', + 'PASSWORD': 'helsinki' + } +} + +TIME_ZONE = 'Europe/Vienna' + +LANGUAGE_CODE = 'de' + +SITE_ID = 1 + +USE_I18N = True + +USE_L10N = True + +MEDIA_ROOT = '' + +MEDIA_URL = '' + +STATIC_ROOT = '' + +STATIC_URL = '/static/' + +ADMIN_MEDIA_PREFIX = '/static/admin/' + +STATICFILES_DIRS = () + +STATICFILES_FINDERS = ( + 'django.contrib.staticfiles.finders.FileSystemFinder', + 'django.contrib.staticfiles.finders.AppDirectoriesFinder', +# 'django.contrib.staticfiles.finders.DefaultStorageFinder', +) + +SECRET_KEY = 'oepk-$!=)c)7+y%cdz-x46_h5bp!o-*9%dv!(sf=3r4zfqk_(t' + +TEMPLATE_LOADERS = ( + 'django.template.loaders.filesystem.Loader', + 'django.template.loaders.app_directories.Loader', +# 'django.template.loaders.eggs.Loader', +) + +MIDDLEWARE_CLASSES = ( + 'django.middleware.common.CommonMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', +) + +ROOT_URLCONF = 'helsinki.urls' + +TEMPLATE_DIRS = ( + os.path.join(os.path.dirname(__file__), "templates"), +) + +INSTALLED_APPS = ( + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.sites', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'django.contrib.admin', + 'helsinki.program', +) + +LOGGING = { + 'version': 1, + 'disable_existing_loggers': False, + 'handlers': { + 'mail_admins': { + 'level': 'ERROR', + 'class': 'django.utils.log.AdminEmailHandler' + } + }, + 'loggers': { + 'django.request':{ + 'handlers': ['mail_admins'], + 'level': 'ERROR', + 'propagate': True, + }, + } +} diff --git a/helsinki.program/templates/404.html b/helsinki.program/templates/404.html new file mode 100644 index 0000000..6281ba0 --- /dev/null +++ b/helsinki.program/templates/404.html @@ -0,0 +1,7 @@ +{% extends "base.html" %} + +{% block title %}Seite nicht gefunden{% endblock %} + +{% block content %} + <p>Es tut uns leid, aber die angeforderte Seite konnte nicht gefunden werden.</p> +{% endblock %} \ No newline at end of file diff --git a/helsinki.program/templates/500.html b/helsinki.program/templates/500.html new file mode 100644 index 0000000..98074ab --- /dev/null +++ b/helsinki.program/templates/500.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} + +{% block title %}Serverfehler{% endblock %} + +{% block content %} + <p> + Ein Fehler ist aufgetreten. + Dieser Fehler wurde an die Serververwalter per E-Mail gemeldet und sollte in Kürze behoben sein. + Vielen Dank für Ihr Verständnis. + </p> +{% endblock %} \ No newline at end of file diff --git a/helsinki.program/templates/base.html b/helsinki.program/templates/base.html new file mode 100644 index 0000000..2ed539e --- /dev/null +++ b/helsinki.program/templates/base.html @@ -0,0 +1,11 @@ +<html> + +<head> + <title>{% block title %}{% endblock %}</title> +</head> + +<body> +{% block content %}{% endblock %} +</body> + +</html> \ No newline at end of file diff --git a/helsinki.program/templates/program/current_box.html b/helsinki.program/templates/program/current_box.html new file mode 100644 index 0000000..d778518 --- /dev/null +++ b/helsinki.program/templates/program/current_box.html @@ -0,0 +1,39 @@ +<html> +<head> + <title>Current program box</title> + <link href="/site_media/styles/base.css" media="screen" rel="stylesheet" type="text/css" /> +</head> +<body> + +<div id="current"> + <div id="current-title">Programm derzeit</div> + + <div id="current-timeslot"> + <div class="start">{{ current.start|date:"H:i" }}</div> + <div class="show {{ current.show.broadcastformat.slug }}"> + <div class="name"><a href="{% url timeslot-detail current.id %}">{{ current.show.name }}</a></div> + {% if current.note %} + <div class="note-title">{{ current.note.title }}</div> + {% else %} + <div class="short-description">{{ current.show.short_description }}</div> + {% endif %} + </div> + </div> + + <div id="next-timeslot"> + <div class="start">{{ next.start|date:"H:i" }}</div> + <div class="show {{ next.show.broadcastformat.slug }}"> + <div class="name"><a href="{% url timeslot-detail next.id %}">{{ next.show.name }}</a></div> + </div> + </div> + + <div id="after-next-timeslot"> + <div class="start">{{ after_next.start|date:"H:i" }}</div> + <div class="show {{ after_next.show.broadcastformat.slug }}"> + <div class="name"><a href="{% url timeslot-detail after_next.id %}">{{ after_next.show.name }}</div></a> + </div> + </div> +</div> + +</body> +</html> \ No newline at end of file diff --git a/helsinki.program/templates/program/day_schedule.html b/helsinki.program/templates/program/day_schedule.html new file mode 100644 index 0000000..6230314 --- /dev/null +++ b/helsinki.program/templates/program/day_schedule.html @@ -0,0 +1,63 @@ +<html> +<head> + <title>Day schedule: {{ day|date:"l, d.m.Y" }}</title> + <link href="/site_media/styles/base.css" media="screen" rel="stylesheet" type="text/css" /> +</head> + +<body> + +<div id="calendar"></div> + +<div id="recommendations"> + <div id="recommendations-title">Programmhinweise</div> + {% for recommendation in recommendations %} + <div class="recommendation {{ recommendation.show.broadcastformat.slug }}"> + <div class="timeslot-start-end">{{ recommendation.timeslot.start|date:"d.m. H:i" }} - {{ recommendation.timeslot.end|date:"H:i" }}</div> + <div class="show-name"><a href="{% url show-detail recommendation.show.slug %}">{{ recommendation.show.name }}</a></div> + <div class="note-title"><a href="{% url timeslot-detail recommendation.timeslot.id %}">{{ recommendation.title }}</a></div> + </div> + {% endfor %} +</div> + +<div id="day-schedule"> + <div id="title">Tagesansicht</div> + <div id="date">{{ day|date:"l, d.m.Y" }}</div> + <div id="timeslots"> + {% for timeslot in timeslots %} + <div class="timeslot {{ timeslot.show.broadcastformat }}"> + <div class="start">{{ timeslot.start|date:"H:i" }}</div> + <div class="show-abbrevs"> + {% for showinformation in timeslot.show.showinformation.all %} + {{ showinformation.abbrev }} + {% endfor %} + {% for showtopic in timeslot.show.showtopic.all %} + {{ showtopic.abbrev }} + {% endfor %} + {% for musicfocus in timeslot.show.musicfocus.all %} + {{ musicfocus.abbrev }} + {% endfor %} + </div> + <div class="show"> + <div class="name"><a href="{% url timeslot-detail timeslot.id %}">{{ timeslot.show.name }}</a></div> + {% if timeslot.note %} + <div class="note-title">Heute: {{ timeslot.note.title }}</div> + {% else %} + <div class="short-description">{{ timeslot.show.short_description }}</div> + {% endif %} + </div> + </div> + {% endfor %} + </div> +</div> + +<div id="broadcastformats"> + <div id="broadcastformats-title">Legende</div> + {% for broadcastformat in broadcastformats %} + <div class="{{ broadcastformat.slug }}"> + <a href="?broadcastformat={{ broadcastformat.slug }}">{{ broadcastformat.format }}</a> + </div> + {% endfor %} +</div> + +</body> +</html> \ No newline at end of file diff --git a/helsinki.program/templates/program/host_detail.html b/helsinki.program/templates/program/host_detail.html new file mode 100644 index 0000000..b780838 --- /dev/null +++ b/helsinki.program/templates/program/host_detail.html @@ -0,0 +1,20 @@ +<html> +<head> + <title>Host detail: {{ host.name }}</title> +</head> +<body> + +<div id="host-detail"> + <div id="name">{{ host.name }}</div> + + {% if host.email %} + <div id="email">{{ host.email }}</div> + {% endif %} + + {% if host.website %} + <div id="website">{{ host.website }}</div> + {% endif %} +</div> + +</body> +</html> \ No newline at end of file diff --git a/helsinki.program/templates/program/host_list.html b/helsinki.program/templates/program/host_list.html new file mode 100644 index 0000000..365154a --- /dev/null +++ b/helsinki.program/templates/program/host_list.html @@ -0,0 +1,16 @@ +<html> +<head> + <title>Host list</title> +</head> +<body> + +<div id="host-list"> +{% for host in hosts %} + <div class="host"> + <a href="{% url host-detail host.id %}">{{ host.name }}</a> + </div> +{% endfor %} +</div> + +</body> +</html> \ No newline at end of file diff --git a/helsinki.program/templates/program/recommendations.html b/helsinki.program/templates/program/recommendations.html new file mode 100644 index 0000000..aa5866a --- /dev/null +++ b/helsinki.program/templates/program/recommendations.html @@ -0,0 +1,21 @@ +<html> +<head> + <title>Recomendations</title> +</head> +<body> + +<div id="recommendations"> +{% for note in recommendations %} + <div class="show"> + <div class="broadcastformat">{{ note.show.broadcastformat }}</div> + <div class="timeslot">{{ note.timeslot.start }}</div> + <div class="show-name"><a href="{% url show-detail note.show.slug %}">{{ note.show.name }}</a></div> + <div class="show-short-description">{{ note.show.short_description }}</div> + <div class="note-title">{{ note.title }}</div> + <div class="note-content">{{ note.content }}</div> + </div> +{% endfor %} +</div> + +</body> +</html> \ No newline at end of file diff --git a/helsinki.program/templates/program/recommendations_box.html b/helsinki.program/templates/program/recommendations_box.html new file mode 100644 index 0000000..94a55dd --- /dev/null +++ b/helsinki.program/templates/program/recommendations_box.html @@ -0,0 +1,20 @@ +<html> +<head> + <title>Recomendations box</title> + <link href="/site_media/styles/base.css" media="screen" rel="stylesheet" type="text/css" /> +</head> +<body> + +<div id="recommendations"> + <div id="recommendations-title">Programmhinweise</div> + {% for recommendation in recommendations %} + <div class="recommendation {{ recommendation.show.broadcastformat.slug }}"> + <div class="timeslot-start-end">{{ recommendation.timeslot.start|date:"d.m. H:i" }}-{{ recommendation.timeslot.end|date:"H:i" }}</div> + <div class="show-name"><a href="{% url show-detail recommendation.show.slug %}">{{ recommendation.show.name }}</a></div> + <div class="note-title"><a href="{% url timeslot-detail recommendation.timeslot.id %}">{{ recommendation.title }}</a></div> + </div> + {% endfor %} +</div> + +</body> +</html> \ No newline at end of file diff --git a/helsinki.program/templates/program/show_detail.html b/helsinki.program/templates/program/show_detail.html new file mode 100644 index 0000000..05e678c --- /dev/null +++ b/helsinki.program/templates/program/show_detail.html @@ -0,0 +1,60 @@ +<html> +<head> + <title>Show detail: {{ show.name }}</title> +</head> +<body> + +<div id="calendar"></div> + +<div id="show-detail"> + <div id="name">{{ show.name }}</div> + + <div id="abbrevs"> + {% for topic in show.showtopic.all %} + <span class="topic-abbrev">{{ topic.abbrev }}</span> + {% endfor %} + + {% for information in show.showinformation.all %} + <span class="information-abbrev">{{ information.abbrev }}</span> + {% endfor %} + + {% for focus in show.musicfocus.all %} + <span class="focus-abbrev">{{ focus.abbrev }}</span> + {% endfor %} + + <span class="broadcastformat-abbrev">{{ show.broadcastformat.abbrev }}</span> + </div> + + <div id="programslots"> + {% for slot in show.programslots.all %} + <div class="programslot">{{ slot }}</div> + {% endfor %} + </div> + + <div id="broadcastformat">{{ show.broadcastformat.format }}</div> + + <div id="hosts"> + {% for host in show.hosts.all %} + <div class="host">{{ host }}</div> + {% endfor %} + </div> + + <div id="short-description">{{ show.short_description }}</div> + + <div id="description">{{ show.description }}</div> + + {% if show.email %} + <div id="email"><a href="mailto:{{ show.email }}">{{ show.email }}</a></div> + {% endif %} + + {% if show.website %} + <div id="website"><a href="{{ show.website }}">{{ show.website }}</a></div> + {% endif %} + + {% if show.cba_series_id %} + <div id="cba-series-id"><a href="http://cba.fro.at/series/{{ show.cba_series_id }}">CBA</a></div> + {% endif %} +</div> + +</body> +</html> \ No newline at end of file diff --git a/helsinki.program/templates/program/show_list.html b/helsinki.program/templates/program/show_list.html new file mode 100644 index 0000000..7643087 --- /dev/null +++ b/helsinki.program/templates/program/show_list.html @@ -0,0 +1,73 @@ +<html> +<head> + <title>Show list</title> +</head> +<body> + +<div id="showtopic-list"> +{% for topic in showtopics %} + <div class="showtopic"> + <span class="abbrev">{{ topic.abbrev }}</span> + <span class="topic">{{ topic }}</span> + </div> +{% endfor %} +</div> + +<div id="showinformation-list"> +{% for information in showinformations %} + <div class="showinformation"> + <span class="abbrev">{{ information.abbrev }}</span> + <span class="information">{{ information }}</span> + </div> +{% endfor %} +</div> + +<div id="musicfocus-list"> +{% for focus in musicfoci %} + <div class="musicfocus"> + <span class="abbrev">{{ focus.abbrev }}</span> + <span class="focus">{{ focus }}</span> + </div> +{% endfor %} +</div> + +<div id="show-list"> +{% for show in shows %} + <div class="show"> + <div class="abbrevs"> + {% for topic in show.showtopic.all %} + <span class="topic-abbrev">{{ topic.abbrev }}</span> + {% endfor %} + + {% for information in show.showinformation.all %} + <span class="information-abbrev">{{ information.abbrev }}</span> + {% endfor %} + + {% for focus in show.musicfocus.all %} + <span class="focus-abbrev">{{ focus.abbrev }}</span> + {% endfor %} + + <span class="broadcastformat-abbrev">{{ show.broadcastformat.abbrev }}</span> + </div> + + <div class="name"><a href="{% url show-detail show.slug %} ">{{ show.name }}</a></div> + + <div class="programslots"> + {% for slot in show.programslots.all %} + <div class="programslot">{{ slot }}</div> + {% endfor %} + </div> + + <div class="short-description">{{ show.short_description }}</div> + </div> +{% endfor %} +</div> + +<div id="broadcastformat-list"> +{% for format in broadcastformats %} + <div class="broadcastformat">{{ format }}</div> +{% endfor %} +</div> + +</body> +</html> \ No newline at end of file diff --git a/helsinki.program/templates/program/timeslot_detail.html b/helsinki.program/templates/program/timeslot_detail.html new file mode 100644 index 0000000..f445f5d --- /dev/null +++ b/helsinki.program/templates/program/timeslot_detail.html @@ -0,0 +1,57 @@ +<html> +<head> + <title>Timeslot detail: {{ timeslot }}</title> +</head> +<body> + +<div id="calendar"></div> + +<div id="timeslot-detail"> + <div id="name">{{ timeslot.show.name }}</div> + + <div id="abbrevs"> + {% for topic in timeslot.show.showtopic.all %} + <span class="topic-abbrev">{{ topic.abbrev }}</span> + {% endfor %} + + {% for information in timeslot.show.showinformation.all %} + <span class="information-abbrev">{{ information.abbrev }}</span> + {% endfor %} + + {% for focus in timeslot.show.musicfocus.all %} + <span class="focus-abbrev">{{ focus.abbrev }}</span> + {% endfor %} + + <span class="broadcastformat-abbrev">{{ timeslot.show.broadcastformat.abbrev }}</span> + </div> + + <div id="programslots"> + {% for slot in timeslot.show.programslots.all %} + <div class="programslot">{{ slot }}</div> + {% endfor %} + </div> + + <div id="broadcastformat">{{ timeslot.show.broadcastformat.format }}</div> + + <div id="hosts"> + {% for host in timeslot.show.hosts.all %} + <div class="host">{{ host }}</div> + {% endfor %} + </div> + + <div id="short-description">{{ timeslot.show.short_description }}</div> + + <div id="description">{{ timeslot.show.description }}</div> + + <div id="note"> + {% if timeslot.note %} + <div class="note"> + <div class="title">{{ timeslot.note.title }}</div> + <div class="content">{{ timeslot.note.content }}</div> + </div> + {% endif %} + </div> +</div> + +</body> +</html> \ No newline at end of file diff --git a/helsinki.program/templates/program/week_schedule.html b/helsinki.program/templates/program/week_schedule.html new file mode 100644 index 0000000..2969d28 --- /dev/null +++ b/helsinki.program/templates/program/week_schedule.html @@ -0,0 +1,87 @@ +<html> +<head> + <title>Week schedule</title> +</head> + +<body> + +<div id="week-schedule"> + <div id="time"> + <div class="1hour">06:00</div> + <div class="1hour">07:00</div> + <div class="1hour">08:00</div> + <div class="1hour">09:00</div> + <div class="1hour">10:00</div> + <div class="1hour">11:00</div> + <div class="1hour">12:00</div> + <div class="1hour">13:00</div> + <div class="1hour">14:00</div> + <div class="1hour">15:00</div> + <div class="1hour">16:00</div> + <div class="1hour">17:00</div> + <div class="1hour">18:00</div> + <div class="1hour">19:00</div> + <div class="1hour">20:00</div> + <div class="1hour">21:00</div> + <div class="1hour">22:00</div> + <div class="1hour">23:00</div> + <div class="1hour">00:00</div> + <div class="1hour">01:00</div> + <div class="1hour">02:00</div> + <div class="1hour">03:00</div> + <div class="1hour">04:00</div> + <div class="1hour">05:00</div> + </div> + + <div id="monday"> + <div class="weekday">{{ monday|date:"l d.m.Y" }}</div> + {% for timeslot in monday_timeslots %} + <div class="timeslot {{ timeslot.show.broadcastformat.slug }}"><a href="{% url timeslot-detail timeslot.id %}">{{ timeslot.show.name }}</a></div> + {% endfor %} + </div> + + <div id="tuesday"> + <div class="weekday">{{ tuesday|date:"l d.m.Y" }}</div> + {% for timeslot in tuesday_timeslots %} + <div class="timeslot {{ timeslot.show.broadcastformat.slug }}"><a href="{% url timeslot-detail timeslot.id %}">{{ timeslot.show.name }}</a></div> + {% endfor %} + </div> + + <div id="wednesday"> + <div class="weekday">{{ wednesday|date:"l d.m.Y" }}</div> + {% for timeslot in wednesday_timeslots %} + <div class="timeslot {{ timeslot.show.broadcastformat.slug }}"><a href="{% url timeslot-detail timeslot.id %}">{{ timeslot.show.name }}</a></div> + {% endfor %} + </div> + + <div id="thursday"> + <div class="weekday">{{ thursday|date:"l d.m.Y" }}</div> + {% for timeslot in thursday_timeslots %} + <div class="timeslot {{ timeslot.show.broadcastformat.slug }}"><a href="{% url timeslot-detail timeslot.id %}">{{ timeslot.show.name }}</a></div> + {% endfor %} + </div> + + <div id="friday"> + <div class="weekday">{{ friday|date:"l d.m.Y" }}</div> + {% for timeslot in friday_timeslots %} + <div class="timeslot {{ timeslot.show.broadcastformat.slug }}"><a href="{% url timeslot-detail timeslot.id %}">{{ timeslot.show.name }}</a></div> + {% endfor %} + </div> + + <div id="saturday"> + <div class="weekday">{{ saturday|date:"l d.m.Y" }}</div> + {% for timeslot in saturday_timeslots %} + <div class="timeslot {{ timeslot.show.broadcastformat.slug }}"><a href="{% url timeslot-detail timeslot.id %}">{{ timeslot.show.name }}</a></div> + {% endfor %} + </div> + + <div id="sunday"> + <div class="weekday">{{ sunday|date:"l d.m.Y" }}</div> + {% for timeslot in sunday_timeslots %} + <div class="timeslot {{ timeslot.show.broadcastformat.slug }}"><a href="{% url timeslot-detail timeslot.id %}">{{ timeslot.show.name }}</a></div> + {% endfor %} + </div> +</div> + +</body> +</html> diff --git a/helsinki.program/urls.py b/helsinki.program/urls.py new file mode 100644 index 0000000..db535ce --- /dev/null +++ b/helsinki.program/urls.py @@ -0,0 +1,9 @@ +from django.conf.urls.defaults import * +from django.contrib import admin + +admin.autodiscover() + +urlpatterns = patterns('', + (r'^admin/', include(admin.site.urls)), + (r'^program/', include('helsinki.program.urls')), +) diff --git a/manage.py b/manage.py deleted file mode 100755 index 5e78ea9..0000000 --- a/manage.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python -from django.core.management import execute_manager -try: - import settings # Assumed to be in the same directory. -except ImportError: - import sys - sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) - sys.exit(1) - -if __name__ == "__main__": - execute_manager(settings) diff --git a/settings.py b/settings.py deleted file mode 100644 index ac4ad72..0000000 --- a/settings.py +++ /dev/null @@ -1,100 +0,0 @@ -import os - -# Django settings for helsinki project. - -DEBUG = True -TEMPLATE_DEBUG = DEBUG - -ADMINS = ( - # ('Your Name', 'your_email@example.com'), -) - -MANAGERS = ADMINS - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.mysql', - 'NAME': 'helsinki2', - 'USER': 'helsinki', - 'PASSWORD': 'helsinki' - } -} - -TIME_ZONE = 'Europe/Vienna' - -LANGUAGE_CODE = 'de' - -SITE_ID = 1 - -USE_I18N = True - -USE_L10N = True - -MEDIA_ROOT = '' - -MEDIA_URL = '' - -STATIC_ROOT = '' - -STATIC_URL = '/static/' - -ADMIN_MEDIA_PREFIX = '/static/admin/' - -STATICFILES_DIRS = () - -STATICFILES_FINDERS = ( - 'django.contrib.staticfiles.finders.FileSystemFinder', - 'django.contrib.staticfiles.finders.AppDirectoriesFinder', -# 'django.contrib.staticfiles.finders.DefaultStorageFinder', -) - -SECRET_KEY = 'oepk-$!=)c)7+y%cdz-x46_h5bp!o-*9%dv!(sf=3r4zfqk_(t' - -TEMPLATE_LOADERS = ( - 'django.template.loaders.filesystem.Loader', - 'django.template.loaders.app_directories.Loader', -# 'django.template.loaders.eggs.Loader', -) - -MIDDLEWARE_CLASSES = ( - 'django.middleware.common.CommonMiddleware', - 'django.contrib.sessions.middleware.SessionMiddleware', - 'django.middleware.csrf.CsrfViewMiddleware', - 'django.contrib.auth.middleware.AuthenticationMiddleware', - 'django.contrib.messages.middleware.MessageMiddleware', -) - -ROOT_URLCONF = 'helsinki.urls' - -TEMPLATE_DIRS = ( - os.path.join(os.path.dirname(__file__), "templates"), -) - -INSTALLED_APPS = ( - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.sites', - 'django.contrib.messages', - 'django.contrib.staticfiles', - 'django.contrib.admin', - 'helsinki.program', -) - -LOGGING = { - 'version': 1, - 'disable_existing_loggers': False, - 'handlers': { - 'mail_admins': { - 'level': 'ERROR', - 'class': 'django.utils.log.AdminEmailHandler' - } - }, - 'loggers': { - 'django.request':{ - 'handlers': ['mail_admins'], - 'level': 'ERROR', - 'propagate': True, - }, - } -} diff --git a/templates/404.html b/templates/404.html deleted file mode 100644 index 6281ba0..0000000 --- a/templates/404.html +++ /dev/null @@ -1,7 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Seite nicht gefunden{% endblock %} - -{% block content %} - <p>Es tut uns leid, aber die angeforderte Seite konnte nicht gefunden werden.</p> -{% endblock %} \ No newline at end of file diff --git a/templates/500.html b/templates/500.html deleted file mode 100644 index 98074ab..0000000 --- a/templates/500.html +++ /dev/null @@ -1,11 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Serverfehler{% endblock %} - -{% block content %} - <p> - Ein Fehler ist aufgetreten. - Dieser Fehler wurde an die Serververwalter per E-Mail gemeldet und sollte in Kürze behoben sein. - Vielen Dank für Ihr Verständnis. - </p> -{% endblock %} \ No newline at end of file diff --git a/templates/base.html b/templates/base.html deleted file mode 100644 index 2ed539e..0000000 --- a/templates/base.html +++ /dev/null @@ -1,11 +0,0 @@ -<html> - -<head> - <title>{% block title %}{% endblock %}</title> -</head> - -<body> -{% block content %}{% endblock %} -</body> - -</html> \ No newline at end of file diff --git a/templates/program/current_box.html b/templates/program/current_box.html deleted file mode 100644 index d778518..0000000 --- a/templates/program/current_box.html +++ /dev/null @@ -1,39 +0,0 @@ -<html> -<head> - <title>Current program box</title> - <link href="/site_media/styles/base.css" media="screen" rel="stylesheet" type="text/css" /> -</head> -<body> - -<div id="current"> - <div id="current-title">Programm derzeit</div> - - <div id="current-timeslot"> - <div class="start">{{ current.start|date:"H:i" }}</div> - <div class="show {{ current.show.broadcastformat.slug }}"> - <div class="name"><a href="{% url timeslot-detail current.id %}">{{ current.show.name }}</a></div> - {% if current.note %} - <div class="note-title">{{ current.note.title }}</div> - {% else %} - <div class="short-description">{{ current.show.short_description }}</div> - {% endif %} - </div> - </div> - - <div id="next-timeslot"> - <div class="start">{{ next.start|date:"H:i" }}</div> - <div class="show {{ next.show.broadcastformat.slug }}"> - <div class="name"><a href="{% url timeslot-detail next.id %}">{{ next.show.name }}</a></div> - </div> - </div> - - <div id="after-next-timeslot"> - <div class="start">{{ after_next.start|date:"H:i" }}</div> - <div class="show {{ after_next.show.broadcastformat.slug }}"> - <div class="name"><a href="{% url timeslot-detail after_next.id %}">{{ after_next.show.name }}</div></a> - </div> - </div> -</div> - -</body> -</html> \ No newline at end of file diff --git a/templates/program/day_schedule.html b/templates/program/day_schedule.html deleted file mode 100644 index 6230314..0000000 --- a/templates/program/day_schedule.html +++ /dev/null @@ -1,63 +0,0 @@ -<html> -<head> - <title>Day schedule: {{ day|date:"l, d.m.Y" }}</title> - <link href="/site_media/styles/base.css" media="screen" rel="stylesheet" type="text/css" /> -</head> - -<body> - -<div id="calendar"></div> - -<div id="recommendations"> - <div id="recommendations-title">Programmhinweise</div> - {% for recommendation in recommendations %} - <div class="recommendation {{ recommendation.show.broadcastformat.slug }}"> - <div class="timeslot-start-end">{{ recommendation.timeslot.start|date:"d.m. H:i" }} - {{ recommendation.timeslot.end|date:"H:i" }}</div> - <div class="show-name"><a href="{% url show-detail recommendation.show.slug %}">{{ recommendation.show.name }}</a></div> - <div class="note-title"><a href="{% url timeslot-detail recommendation.timeslot.id %}">{{ recommendation.title }}</a></div> - </div> - {% endfor %} -</div> - -<div id="day-schedule"> - <div id="title">Tagesansicht</div> - <div id="date">{{ day|date:"l, d.m.Y" }}</div> - <div id="timeslots"> - {% for timeslot in timeslots %} - <div class="timeslot {{ timeslot.show.broadcastformat }}"> - <div class="start">{{ timeslot.start|date:"H:i" }}</div> - <div class="show-abbrevs"> - {% for showinformation in timeslot.show.showinformation.all %} - {{ showinformation.abbrev }} - {% endfor %} - {% for showtopic in timeslot.show.showtopic.all %} - {{ showtopic.abbrev }} - {% endfor %} - {% for musicfocus in timeslot.show.musicfocus.all %} - {{ musicfocus.abbrev }} - {% endfor %} - </div> - <div class="show"> - <div class="name"><a href="{% url timeslot-detail timeslot.id %}">{{ timeslot.show.name }}</a></div> - {% if timeslot.note %} - <div class="note-title">Heute: {{ timeslot.note.title }}</div> - {% else %} - <div class="short-description">{{ timeslot.show.short_description }}</div> - {% endif %} - </div> - </div> - {% endfor %} - </div> -</div> - -<div id="broadcastformats"> - <div id="broadcastformats-title">Legende</div> - {% for broadcastformat in broadcastformats %} - <div class="{{ broadcastformat.slug }}"> - <a href="?broadcastformat={{ broadcastformat.slug }}">{{ broadcastformat.format }}</a> - </div> - {% endfor %} -</div> - -</body> -</html> \ No newline at end of file diff --git a/templates/program/host_detail.html b/templates/program/host_detail.html deleted file mode 100644 index b780838..0000000 --- a/templates/program/host_detail.html +++ /dev/null @@ -1,20 +0,0 @@ -<html> -<head> - <title>Host detail: {{ host.name }}</title> -</head> -<body> - -<div id="host-detail"> - <div id="name">{{ host.name }}</div> - - {% if host.email %} - <div id="email">{{ host.email }}</div> - {% endif %} - - {% if host.website %} - <div id="website">{{ host.website }}</div> - {% endif %} -</div> - -</body> -</html> \ No newline at end of file diff --git a/templates/program/host_list.html b/templates/program/host_list.html deleted file mode 100644 index 365154a..0000000 --- a/templates/program/host_list.html +++ /dev/null @@ -1,16 +0,0 @@ -<html> -<head> - <title>Host list</title> -</head> -<body> - -<div id="host-list"> -{% for host in hosts %} - <div class="host"> - <a href="{% url host-detail host.id %}">{{ host.name }}</a> - </div> -{% endfor %} -</div> - -</body> -</html> \ No newline at end of file diff --git a/templates/program/recommendations.html b/templates/program/recommendations.html deleted file mode 100644 index aa5866a..0000000 --- a/templates/program/recommendations.html +++ /dev/null @@ -1,21 +0,0 @@ -<html> -<head> - <title>Recomendations</title> -</head> -<body> - -<div id="recommendations"> -{% for note in recommendations %} - <div class="show"> - <div class="broadcastformat">{{ note.show.broadcastformat }}</div> - <div class="timeslot">{{ note.timeslot.start }}</div> - <div class="show-name"><a href="{% url show-detail note.show.slug %}">{{ note.show.name }}</a></div> - <div class="show-short-description">{{ note.show.short_description }}</div> - <div class="note-title">{{ note.title }}</div> - <div class="note-content">{{ note.content }}</div> - </div> -{% endfor %} -</div> - -</body> -</html> \ No newline at end of file diff --git a/templates/program/recommendations_box.html b/templates/program/recommendations_box.html deleted file mode 100644 index 94a55dd..0000000 --- a/templates/program/recommendations_box.html +++ /dev/null @@ -1,20 +0,0 @@ -<html> -<head> - <title>Recomendations box</title> - <link href="/site_media/styles/base.css" media="screen" rel="stylesheet" type="text/css" /> -</head> -<body> - -<div id="recommendations"> - <div id="recommendations-title">Programmhinweise</div> - {% for recommendation in recommendations %} - <div class="recommendation {{ recommendation.show.broadcastformat.slug }}"> - <div class="timeslot-start-end">{{ recommendation.timeslot.start|date:"d.m. H:i" }}-{{ recommendation.timeslot.end|date:"H:i" }}</div> - <div class="show-name"><a href="{% url show-detail recommendation.show.slug %}">{{ recommendation.show.name }}</a></div> - <div class="note-title"><a href="{% url timeslot-detail recommendation.timeslot.id %}">{{ recommendation.title }}</a></div> - </div> - {% endfor %} -</div> - -</body> -</html> \ No newline at end of file diff --git a/templates/program/show_detail.html b/templates/program/show_detail.html deleted file mode 100644 index 05e678c..0000000 --- a/templates/program/show_detail.html +++ /dev/null @@ -1,60 +0,0 @@ -<html> -<head> - <title>Show detail: {{ show.name }}</title> -</head> -<body> - -<div id="calendar"></div> - -<div id="show-detail"> - <div id="name">{{ show.name }}</div> - - <div id="abbrevs"> - {% for topic in show.showtopic.all %} - <span class="topic-abbrev">{{ topic.abbrev }}</span> - {% endfor %} - - {% for information in show.showinformation.all %} - <span class="information-abbrev">{{ information.abbrev }}</span> - {% endfor %} - - {% for focus in show.musicfocus.all %} - <span class="focus-abbrev">{{ focus.abbrev }}</span> - {% endfor %} - - <span class="broadcastformat-abbrev">{{ show.broadcastformat.abbrev }}</span> - </div> - - <div id="programslots"> - {% for slot in show.programslots.all %} - <div class="programslot">{{ slot }}</div> - {% endfor %} - </div> - - <div id="broadcastformat">{{ show.broadcastformat.format }}</div> - - <div id="hosts"> - {% for host in show.hosts.all %} - <div class="host">{{ host }}</div> - {% endfor %} - </div> - - <div id="short-description">{{ show.short_description }}</div> - - <div id="description">{{ show.description }}</div> - - {% if show.email %} - <div id="email"><a href="mailto:{{ show.email }}">{{ show.email }}</a></div> - {% endif %} - - {% if show.website %} - <div id="website"><a href="{{ show.website }}">{{ show.website }}</a></div> - {% endif %} - - {% if show.cba_series_id %} - <div id="cba-series-id"><a href="http://cba.fro.at/series/{{ show.cba_series_id }}">CBA</a></div> - {% endif %} -</div> - -</body> -</html> \ No newline at end of file diff --git a/templates/program/show_list.html b/templates/program/show_list.html deleted file mode 100644 index 7643087..0000000 --- a/templates/program/show_list.html +++ /dev/null @@ -1,73 +0,0 @@ -<html> -<head> - <title>Show list</title> -</head> -<body> - -<div id="showtopic-list"> -{% for topic in showtopics %} - <div class="showtopic"> - <span class="abbrev">{{ topic.abbrev }}</span> - <span class="topic">{{ topic }}</span> - </div> -{% endfor %} -</div> - -<div id="showinformation-list"> -{% for information in showinformations %} - <div class="showinformation"> - <span class="abbrev">{{ information.abbrev }}</span> - <span class="information">{{ information }}</span> - </div> -{% endfor %} -</div> - -<div id="musicfocus-list"> -{% for focus in musicfoci %} - <div class="musicfocus"> - <span class="abbrev">{{ focus.abbrev }}</span> - <span class="focus">{{ focus }}</span> - </div> -{% endfor %} -</div> - -<div id="show-list"> -{% for show in shows %} - <div class="show"> - <div class="abbrevs"> - {% for topic in show.showtopic.all %} - <span class="topic-abbrev">{{ topic.abbrev }}</span> - {% endfor %} - - {% for information in show.showinformation.all %} - <span class="information-abbrev">{{ information.abbrev }}</span> - {% endfor %} - - {% for focus in show.musicfocus.all %} - <span class="focus-abbrev">{{ focus.abbrev }}</span> - {% endfor %} - - <span class="broadcastformat-abbrev">{{ show.broadcastformat.abbrev }}</span> - </div> - - <div class="name"><a href="{% url show-detail show.slug %} ">{{ show.name }}</a></div> - - <div class="programslots"> - {% for slot in show.programslots.all %} - <div class="programslot">{{ slot }}</div> - {% endfor %} - </div> - - <div class="short-description">{{ show.short_description }}</div> - </div> -{% endfor %} -</div> - -<div id="broadcastformat-list"> -{% for format in broadcastformats %} - <div class="broadcastformat">{{ format }}</div> -{% endfor %} -</div> - -</body> -</html> \ No newline at end of file diff --git a/templates/program/timeslot_detail.html b/templates/program/timeslot_detail.html deleted file mode 100644 index f445f5d..0000000 --- a/templates/program/timeslot_detail.html +++ /dev/null @@ -1,57 +0,0 @@ -<html> -<head> - <title>Timeslot detail: {{ timeslot }}</title> -</head> -<body> - -<div id="calendar"></div> - -<div id="timeslot-detail"> - <div id="name">{{ timeslot.show.name }}</div> - - <div id="abbrevs"> - {% for topic in timeslot.show.showtopic.all %} - <span class="topic-abbrev">{{ topic.abbrev }}</span> - {% endfor %} - - {% for information in timeslot.show.showinformation.all %} - <span class="information-abbrev">{{ information.abbrev }}</span> - {% endfor %} - - {% for focus in timeslot.show.musicfocus.all %} - <span class="focus-abbrev">{{ focus.abbrev }}</span> - {% endfor %} - - <span class="broadcastformat-abbrev">{{ timeslot.show.broadcastformat.abbrev }}</span> - </div> - - <div id="programslots"> - {% for slot in timeslot.show.programslots.all %} - <div class="programslot">{{ slot }}</div> - {% endfor %} - </div> - - <div id="broadcastformat">{{ timeslot.show.broadcastformat.format }}</div> - - <div id="hosts"> - {% for host in timeslot.show.hosts.all %} - <div class="host">{{ host }}</div> - {% endfor %} - </div> - - <div id="short-description">{{ timeslot.show.short_description }}</div> - - <div id="description">{{ timeslot.show.description }}</div> - - <div id="note"> - {% if timeslot.note %} - <div class="note"> - <div class="title">{{ timeslot.note.title }}</div> - <div class="content">{{ timeslot.note.content }}</div> - </div> - {% endif %} - </div> -</div> - -</body> -</html> \ No newline at end of file diff --git a/templates/program/week_schedule.html b/templates/program/week_schedule.html deleted file mode 100644 index 2969d28..0000000 --- a/templates/program/week_schedule.html +++ /dev/null @@ -1,87 +0,0 @@ -<html> -<head> - <title>Week schedule</title> -</head> - -<body> - -<div id="week-schedule"> - <div id="time"> - <div class="1hour">06:00</div> - <div class="1hour">07:00</div> - <div class="1hour">08:00</div> - <div class="1hour">09:00</div> - <div class="1hour">10:00</div> - <div class="1hour">11:00</div> - <div class="1hour">12:00</div> - <div class="1hour">13:00</div> - <div class="1hour">14:00</div> - <div class="1hour">15:00</div> - <div class="1hour">16:00</div> - <div class="1hour">17:00</div> - <div class="1hour">18:00</div> - <div class="1hour">19:00</div> - <div class="1hour">20:00</div> - <div class="1hour">21:00</div> - <div class="1hour">22:00</div> - <div class="1hour">23:00</div> - <div class="1hour">00:00</div> - <div class="1hour">01:00</div> - <div class="1hour">02:00</div> - <div class="1hour">03:00</div> - <div class="1hour">04:00</div> - <div class="1hour">05:00</div> - </div> - - <div id="monday"> - <div class="weekday">{{ monday|date:"l d.m.Y" }}</div> - {% for timeslot in monday_timeslots %} - <div class="timeslot {{ timeslot.show.broadcastformat.slug }}"><a href="{% url timeslot-detail timeslot.id %}">{{ timeslot.show.name }}</a></div> - {% endfor %} - </div> - - <div id="tuesday"> - <div class="weekday">{{ tuesday|date:"l d.m.Y" }}</div> - {% for timeslot in tuesday_timeslots %} - <div class="timeslot {{ timeslot.show.broadcastformat.slug }}"><a href="{% url timeslot-detail timeslot.id %}">{{ timeslot.show.name }}</a></div> - {% endfor %} - </div> - - <div id="wednesday"> - <div class="weekday">{{ wednesday|date:"l d.m.Y" }}</div> - {% for timeslot in wednesday_timeslots %} - <div class="timeslot {{ timeslot.show.broadcastformat.slug }}"><a href="{% url timeslot-detail timeslot.id %}">{{ timeslot.show.name }}</a></div> - {% endfor %} - </div> - - <div id="thursday"> - <div class="weekday">{{ thursday|date:"l d.m.Y" }}</div> - {% for timeslot in thursday_timeslots %} - <div class="timeslot {{ timeslot.show.broadcastformat.slug }}"><a href="{% url timeslot-detail timeslot.id %}">{{ timeslot.show.name }}</a></div> - {% endfor %} - </div> - - <div id="friday"> - <div class="weekday">{{ friday|date:"l d.m.Y" }}</div> - {% for timeslot in friday_timeslots %} - <div class="timeslot {{ timeslot.show.broadcastformat.slug }}"><a href="{% url timeslot-detail timeslot.id %}">{{ timeslot.show.name }}</a></div> - {% endfor %} - </div> - - <div id="saturday"> - <div class="weekday">{{ saturday|date:"l d.m.Y" }}</div> - {% for timeslot in saturday_timeslots %} - <div class="timeslot {{ timeslot.show.broadcastformat.slug }}"><a href="{% url timeslot-detail timeslot.id %}">{{ timeslot.show.name }}</a></div> - {% endfor %} - </div> - - <div id="sunday"> - <div class="weekday">{{ sunday|date:"l d.m.Y" }}</div> - {% for timeslot in sunday_timeslots %} - <div class="timeslot {{ timeslot.show.broadcastformat.slug }}"><a href="{% url timeslot-detail timeslot.id %}">{{ timeslot.show.name }}</a></div> - {% endfor %} - </div> -</div> - -</body> -</html> diff --git a/urls.py b/urls.py deleted file mode 100644 index db535ce..0000000 --- a/urls.py +++ /dev/null @@ -1,9 +0,0 @@ -from django.conf.urls.defaults import * -from django.contrib import admin - -admin.autodiscover() - -urlpatterns = patterns('', - (r'^admin/', include(admin.site.urls)), - (r'^program/', include('helsinki.program.urls')), -) -- cgit v0.10.2