import django.conf.global_settings as DEFAULT_SETTINGS
DEBUG = True # Turn off for production
-TEMPLATE_DEBUG = DEBUG
DEBUG_TOOLBAR = False
PROJECT_DIR = os.path.normpath(os.path.dirname(os.path.dirname(__file__)))
# Make this unique, and don't share it with anybody.
SECRET_KEY = '3qm&@6264-=st16)7_xa*ds+31e0mqqs@+*!ud7gzt$tq!b^qn'
-# List of callables that know how to import templates from various sources.
-TEMPLATE_LOADERS = (
- 'django.template.loaders.filesystem.Loader',
- 'django.template.loaders.app_directories.Loader',
-# 'django.template.loaders.eggs.load_template_source',
-)
-
MIDDLEWARE_CLASSES = (
'django.middleware.cache.UpdateCacheMiddleware',
#'django.middleware.gzip.GZipMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware',
)
-TEMPLATE_CONTEXT_PROCESSORS = DEFAULT_SETTINGS.TEMPLATE_CONTEXT_PROCESSORS + (
- 'django.core.context_processors.request',
- 'panikweb.context_processors.site_url',
-)
+TEMPLATES = [
+ {
+ 'BACKEND': 'django.template.backends.django.DjangoTemplates',
+ 'DIRS': [
+ os.path.join(PROJECT_DIR, 'panikweb_templates'),
+ ],
+ 'APP_DIRS': True,
+ 'OPTIONS': {
+ 'context_processors': [
+ 'django.contrib.auth.context_processors.auth',
+ 'django.template.context_processors.debug',
+ 'django.template.context_processors.i18n',
+ 'django.template.context_processors.media',
+ 'django.template.context_processors.request',
+ 'django.template.context_processors.static',
+ 'django.template.context_processors.tz',
+ 'panikweb.context_processors.site_url',
+ ],
+ },
+ },
+]
ROOT_URLCONF = 'panikweb.urls'
'panikweb.archives',
'compressor',
'sorl.thumbnail',
- 'jquery',
'ckeditor',
'emissions',
'newsletter',
-from django.conf.urls import patterns, include, url
+from django.conf.urls import include, url
from django.conf import settings
from django.views.generic import RedirectView
from django.contrib import admin
-urlpatterns = patterns('',
- url(r'^$', 'panikweb.views.home', name='home'),
- url(r'^onair.json$', 'panikweb.views.onair', name='onair'),
- url(r'^programme/$', 'panikweb.views.program', name='program'),
- url(r'^programme/(?P<year>\d{4})/(?P<week>\d+)/$', 'panikweb.views.program', name='program_week'),
- url(r'^grille$', 'panikweb.views.grid', name='grid'),
+from . import search
+from . import views
+
+urlpatterns = [
+ url(r'^$', views.home, name='home'),
+ url(r'^onair.json$', views.onair, name='onair'),
+ url(r'^programme/$', views.program, name='program'),
+ url(r'^programme/(?P<year>\d{4})/(?P<week>\d+)/$', views.program, name='program_week'),
+ url(r'^grille$', views.grid, name='grid'),
url(r'^emissions/$', RedirectView.as_view(pattern_name='home'), name='emissions'),
- url(r'^emissions/(?P<slug>[\w,-]+)/episodes/$', 'panikweb.views.emissionEpisodes', name='emissionEpisodes'),
- url(r'^emissions/(?P<slug>[\w,-]+)/podcasts.rss', 'panikweb.views.emission_podcasts_feed', name='emission-podcasts'),
- url(r'^emissions/(?P<slug>[\w,-]+)/chat/$', 'panikweb.views.chat', name='emission-chat'),
- url(r'^emissions/(?P<emission_slug>[\w,-]+)/(?P<slug>[\w,-]+)/$', 'panikweb.views.episode', name='episode-view'),
- url(r'^emissions/(?P<emission_slug>[\w,-]+)/(?P<slug>[\w,-]+)/$', 'panikweb.views.episode', name='episode-view'),
+ url(r'^emissions/(?P<slug>[\w,-]+)/episodes/$', views.emissionEpisodes, name='emissionEpisodes'),
+ url(r'^emissions/(?P<slug>[\w,-]+)/podcasts.rss', views.emission_podcasts_feed, name='emission-podcasts'),
+ url(r'^emissions/(?P<slug>[\w,-]+)/chat/$', views.chat, name='emission-chat'),
+ url(r'^emissions/(?P<emission_slug>[\w,-]+)/(?P<slug>[\w,-]+)/$', views.episode, name='episode-view'),
url(r'^emissions/(?P<emission_slug>[\w,-]+)/(?P<episode_slug>[\w,-]+)/embed/(?P<pk>\d+)/$',
- 'panikweb.views.soundfile_embed', name='soundfile-embed-view'),
+ views.soundfile_embed, name='soundfile-embed-view'),
url(r'^emissions/(?P<emission_slug>[\w,-]+)/(?P<episode_slug>[\w,-]+)/dlg-embed/(?P<pk>\d+)/$',
- 'panikweb.views.soundfile_dlg_embed', name='soundfile-dialog-embed-view'),
+ views.soundfile_dlg_embed, name='soundfile-dialog-embed-view'),
url(r'^emissions/(?P<slug>[\w,-]+)/playlist/(?P<year>[0-9]{4})-(?P<month>[-\w]+)-(?P<day>[0-9]+)/$',
- 'panikweb.views.nonstop_playlist', name='nonstop-playlist'),
- url(r'^emissions/(?P<slug>[\w,-]+)/$', 'panikweb.views.emission', name='emission-view'),
- url(r'^ckeditor/', include('ckeditor.urls')),
- url(r'^emissions/archives$', 'panikweb.views.emissionsArchives', name='emissionsArchives'),
- url(r'^sons/$', 'panikweb.views.listen', name='listen'),
- url(r'^sons/archives/$', 'panikweb.search.listenArchives', name='listenArchives'),
- url(r'^actus/$', 'panikweb.views.news', name='news'),
- url(r'^actus/agenda/$', 'panikweb.views.agenda', name='agenda'),
+ views.nonstop_playlist, name='nonstop-playlist'),
+ url(r'^emissions/(?P<slug>[\w,-]+)/$', views.emission, name='emission-view'),
+ url(r'^emissions/archives$', views.emissionsArchives, name='emissionsArchives'),
+ url(r'^sons/$', views.listen, name='listen'),
+ url(r'^sons/archives/$', search.listenArchives, name='listenArchives'),
+ url(r'^actus/$', views.news, name='news'),
+ url(r'^actus/agenda/$', views.agenda, name='agenda'),
url(r'^actus/agenda/(?P<year>[0-9]{4})/(?P<month>[0-9]+)/$',
- 'panikweb.views.agenda_by_month', name='agenda_by_month'),
+ views.agenda_by_month, name='agenda_by_month'),
url(r'^actus/agenda$', RedirectView.as_view(pattern_name='agenda', permanent=True)),
- url(r'^actus/archives/$', 'panikweb.search.newsArchives', name='newsArchives'),
- url(r'^actus/(?P<slug>[\w,-]+)$', 'panikweb.views.newsitemview', name='newsitem-view'),
+ url(r'^actus/archives/$', search.newsArchives, name='newsArchives'),
+ url(r'^actus/(?P<slug>[\w,-]+)$', views.newsitemview, name='newsitem-view'),
- url(r'^party', 'panikweb.views.party', name='party'),
+ url(r'^party', views.party, name='party'),
- url(r'^recherche/', 'panikweb.search.view', name='search'),
+ url(r'^recherche/', search.view, name='search'),
- url(r'^actus.rss', 'panikweb.views.rss_news_feed', name='rss-feed'),
- url(r'^actus.atom', 'panikweb.views.atom_news_feed', name='atom-feed'),
- url(r'^podcasts.rss', 'panikweb.views.podcasts_feed', name='podcasts-feed'),
+ url(r'^actus.rss', views.rss_news_feed, name='rss-feed'),
+ url(r'^actus.atom', views.atom_news_feed, name='atom-feed'),
+ url(r'^podcasts.rss', views.podcasts_feed, name='podcasts-feed'),
url(r'^newsletter/', include('newsletter.urls')),
url(r'^admin/', include(admin.site.urls)),
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
-)
+]
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
urlpatterns += staticfiles_urlpatterns()
from django.conf.urls.static import static
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
-urlpatterns += patterns('', url(r'', include('combo.public.urls')))
+urlpatterns.append(url(r'', include('combo.public.urls')))
try:
from local_urls import *
{% load i18n %}
<nav class="contextual-menu">
<ul>
- <li class="{% if sectionName = "Home" %}active{% endif %}"><a href="{% url 'home' %}">
+ <li class="{% if sectionName == "Home" %}active{% endif %}"><a href="{% url 'home' %}">
<span class="nav-icon icon-home resymbol"></span>
<span class="iconLabel">{% trans 'Home' %}</span>
</a></li>
- <li class="{% if sectionName = "News" %}active{% endif %}"><a title="Actualité des émissions et programmes" href="{% url 'news' %}">
+ <li class="{% if sectionName == "News" %}active{% endif %}"><a title="Actualité des émissions et programmes" href="{% url 'news' %}">
<span class="nav-icon icon-bullhorn resymbol" ></span>
<span class="iconLabel">{% trans 'News' %}</span>
</a></li>
- <li class="{% if sectionName = "Listen" %}active{% endif %}"><a title="Derniers contenus écoutables publiés" href="{% url 'listen' %}">
+ <li class="{% if sectionName == "Listen" %}active{% endif %}"><a title="Derniers contenus écoutables publiés" href="{% url 'listen' %}">
<span class="nav-icon icon-headphones resymbol" ></span>
<span class="iconLabel">{% trans 'Sounds' %}</span>
</a></li>
- <li class="{% if sectionName = "Topiks" %}active{% endif %}"><a href="/topiks/">
+ <li class="{% if sectionName == "Topiks" %}active{% endif %}"><a href="/topiks/">
<span class="nav-icon icon-bolt" ></span>
<span class="iconLabel">Topiks</span>
</a></li>
- <li class="{% if sectionName = "Emissions" %}active{% endif %}"><a title="Les émissions, le programme de la semaine, la grille" href="{% url 'grid' %}">
+ <li class="{% if sectionName == "Emissions" %}active{% endif %}"><a title="Les émissions, le programme de la semaine, la grille" href="{% url 'grid' %}">
<span class="nav-icon icon-calendar resymbol" ></span>
<span class="iconLabel">{% trans 'Program' %}</span>
</a></li>
- <li class="{% if sectionName = "About" %}active{% endif %}"><a title="Qui sommes-nous, les groupes, la charte…" href="/la-radio/">
+ <li class="{% if sectionName == "About" %}active{% endif %}"><a title="Qui sommes-nous, les groupes, la charte…" href="/la-radio/">
<span class="nav-icon icon-info-sign" ></span>
<span class="iconLabel">{% trans 'About' %}</span>
</a></li>
/
<span data-lang="en"{% if LANGUAGE_CODE == 'en' %}class="lang-on"{% endif %}>EN</span>
</li>
- <li id="nav-search" class="{% if sectionName = "Search" %}active{% endif %}"><a href="{% url 'search' %}">
+ <li id="nav-search" class="{% if sectionName == "Search" %}active{% endif %}"><a href="{% url 'search' %}">
<span class="nav-icon icon-search resymbol" ></span>
</a>
<form action="{% url 'search' %}"><input placeholder="{% trans 'Search' %}" name="q" type="search"></input></form>