Commit ecb114aa authored by fred's avatar fred

put radio name into settings

parent cb5295c9
def site_url(request):
return {'site_url': request.build_absolute_uri('/').strip('/')}
from django.conf import settings
def panikweb(request):
return {
'site_url': request.build_absolute_uri('/').strip('/'),
'radio_name': settings.RADIO_NAME,
'radio_long_name': settings.RADIO_LONG_NAME,
}
......@@ -124,7 +124,7 @@ TEMPLATES = [
'django.template.context_processors.request',
'django.template.context_processors.static',
'django.template.context_processors.tz',
'panikweb.context_processors.site_url',
'panikweb.context_processors.panikweb',
],
},
},
......@@ -237,6 +237,8 @@ TEMPLATE_VARS = {}
COMBO_DASHBOARD_ENABLED = False
JSON_CELL_TYPES = {}
RADIO_NAME = 'Radio Panik'
RADIO_LONG_NAME = 'Radio Panik - 105.4 FM'
WEBSITE_BASE_URL = 'http://www.radiopanik.org/'
COMBO_INITIAL_LOGIN_PAGE_PATH = '/'
......
......@@ -674,7 +674,7 @@ class RssCustomPodcastsFeed(Rss201rev2Feed):
if emission:
handler.addQuickElement('title', emission.title)
else:
handler.addQuickElement('title', 'Radio Panik')
handler.addQuickElement('title', settings.RADIO_NAME)
handler.addQuickElement('url', image_url)
handler.endElement('image')
handler.addQuickElement('itunes:explicit', 'no') # invidividual items will get their own value
......@@ -693,10 +693,10 @@ class RssCustomPodcastsFeed(Rss201rev2Feed):
handler.addQuickElement('itunes:name', emission.title)
handler.endElement('itunes:owner')
else:
handler.addQuickElement('itunes:author', 'Radio Panik')
handler.addQuickElement('itunes:author', settings.RADIO_NAME)
handler.startElement('itunes:owner', {})
handler.addQuickElement('itunes:email', 'info@radiopanik.org')
handler.addQuickElement('itunes:name', 'Radio Panik')
handler.addQuickElement('itunes:name', settings.RADIO_NAME)
handler.endElement('itunes:owner')
def root_attributes(self):
......@@ -728,7 +728,7 @@ class RssCustomPodcastsFeed(Rss201rev2Feed):
class PodcastsFeed(Feed):
title = 'Radio Panik - Podcasts'
title = '%s - Podcasts' % settings.RADIO_NAME
link = '/'
description_template = 'feed/soundfile.html'
feed_type = RssCustomPodcastsFeed
......@@ -771,7 +771,7 @@ podcasts_feed = PodcastsFeed()
class RssNewsFeed(Feed):
title = 'Radio Panik'
title = settings.RADIO_NAME
link = '/news/'
description_template = 'feed/newsitem.html'
......
......@@ -2,7 +2,7 @@
<html>
<head>
<meta charset="UTF-8" />
<title>Radio Panik - {% block title %}{% endblock %}</title>
<title>{{ radio_name }} - {% block title %}{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="{{ STATIC_URL }}img/favicon-16.png" type="image/png" sizes="16x16">
<link rel="icon" href="{{ STATIC_URL }}img/favicon-32.png" type="image/png" sizes="32x32">
......@@ -10,16 +10,16 @@
<link rel="apple-touch-icon" href="{{ STATIC_URL}}img/logo-panik-500-invert.png">
<link rel="canonical" href="{{ request.build_absolute_uri }}" />
<meta name="og:site_name" content="Radio Panik"/>
<meta name="og:site_name" content="{{ radio_name }}"/>
{% block head %}
<meta name="description" content="En vous branchant sur le 105.4 FM, vous pénétrerez plus avant dans l'œil du cyclone…" />
<meta property="og:title" content="Radio Panik - 105.4 FM" />
<meta property="og:title" content="{{ radio_long_name }}" />
<meta property="og:image" content="{{ site_url }}{% static 'img/Radio_Panik_Logo_2016-01.png' %}" />
<meta property="og:description" content="En vous branchant sur le 105.4 FM, vous pénétrerez plus avant dans l'œil du cyclone…" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="Radio Panik - 105.4 FM" />
<meta name="twitter:title" content="{{ radio_long_name }}" />
<meta name="twitter:image" content="{{ site_url }}{% static 'img/Radio_Panik_Logo_2016-01.png' %}" />
<meta name="twitter:description" content="En vous branchant sur le 105.4 FM, vous pénétrerez plus avant dans l'œil du cyclone…" />
......@@ -28,7 +28,7 @@
<link rel="alternate" type="application/rss+xml" href="{% url 'rss-feed' %}" title="News rss feed">
<link rel="alternate" type="application/rss+xml" href="{% url 'atom-feed' %}" title="News atom feed">
{% block podcasts-feed %}
<link rel="alternate" type="application/rss+xml" href="{% url 'podcasts-feed' %}" title="Radio Panik Podcasts">
<link rel="alternate" type="application/rss+xml" href="{% url 'podcasts-feed' %}" title="{{ radio_name }} Podcasts">
{% endblock %}
<link rel="stylesheet" href="{{ STATIC_URL }}css/style.css" type="text/css" />
......@@ -52,7 +52,7 @@
<div class="wrapper sided" >
<div id="backgroundBox" class="cf">
<a href="{% url 'home' %}" id="mainHeader"><div>
<h1 class="top" id="radiopanik">Radio Panik - 105.4 FM</h1>
<h1 class="top" id="radiopanik">{{ radio_long_name }}</h1>
</div></a>
<div id="Player" class="withoutPlaylist">
{% block listen %}{% player %}{% endblock %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment