summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2017-04-27 14:16:41 (GMT)
committerChristian Pointner <equinox@helsinki.at>2017-04-27 14:16:41 (GMT)
commitda67f298b845aef31403dafe73942207486dedf8 (patch)
treebcbffdde13aed5b7f798f2487cde16093f19a35f
parent3a573abf7a63a6f9a7d8c90fa8358250e82585bd (diff)
parentdbefa4de1d180a92bdcf591cb234c74970421e45 (diff)
Merge branch 'master' into stable
-rw-r--r--nop/views.py29
-rw-r--r--pv/settings.py7
2 files changed, 12 insertions, 24 deletions
diff --git a/nop/views.py b/nop/views.py
index d00eea5..4c29829 100644
--- a/nop/views.py
+++ b/nop/views.py
@@ -1,5 +1,6 @@
-# coding=utf-8
+# -*- coding: utf-8 -*-
+from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned
from django.shortcuts import render_to_response
from django.http import HttpResponse
@@ -13,26 +14,6 @@ from datetime import datetime
DB = 'nop'
-MUSIKPROG_IDS = (
- 1, # unmodieriertes musikprogramm
- 17, # bumbumtschak
- 203, # Hotel Passage
- 204, # Radyo Mezopotamya
- 206, # Abunda Lingva
- 290, # styrian underground
- 523, # Songbirds
- 562, # Singing Birds
- 563, # canzoni italiane
- 564, # on connait la chanson
- 604 # pussy*whipped
-)
-
-SPECIAL_PROGRAM_IDS = (
- 66, # Probebühne
- 374 # musikprogramm bunt gemischt
-)
-
-
class NopForm(forms.Form):
date = forms.DateField(
required=True,
@@ -88,8 +69,8 @@ def _current():
album = None
show = _get_show()
- if show['id'] in MUSIKPROG_IDS \
- or (show['id'] in SPECIAL_PROGRAM_IDS and not show['note']):
+ if show['id'] in settings.MUSIKPROG_IDS \
+ or (show['id'] in settings.SPECIAL_PROGRAM_IDS and not show['note']):
result = _which().objects.using(DB).filter(carttype__exact='pool')[0]
artist = result.artist
title = result.title
@@ -105,7 +86,7 @@ def _current():
def _bydate(year=None, month=None, day=None, hour=None, minute=None):
show = _get_show(datetime(year, month, day, hour, minute))
- if show['id'] and show['id'] not in MUSIKPROG_IDS:
+ if show['id'] and show['id'] not in settings.MUSIKPROG_IDS:
return [{'show': show['name'],
'start': show['start'],
'artist': None,
diff --git a/pv/settings.py b/pv/settings.py
index e967b39..47b9d2e 100644
--- a/pv/settings.py
+++ b/pv/settings.py
@@ -1,3 +1,5 @@
+# -*- coding: utf-8 -*-
+
# Django settings for pv project.
import os.path
@@ -97,6 +99,11 @@ TINYMCE_DEFAULT_CONFIG = {
CACHE_BACKEND = 'locmem://'
+MUSIKPROG_IDS = (
+ 1, # unmodieriertes musikprogramm
+)
+SPECIAL_PROGRAM_IDS = ()
+
try:
from local_settings import *
except ImportError: