Commit 9385eada authored by fred's avatar fred
Browse files

add settings to control program/emissions/news url prefix

parent 6bd4e15a
......@@ -254,6 +254,10 @@ HOME_FOCUS_COUNT = 3
HOME_NEWSITEMS_COUNT = 3
HOME_PODCASTS_COUNT = 3
PROGRAM_PREFIX = 'programme/'
EMISSIONS_PREFIX = 'emissions/'
NEWSITEMS_PREFIX = 'actus/'
COMBO_INITIAL_LOGIN_PAGE_PATH = '/'
COMBO_WELCOME_PAGE_PATH = None
......
......@@ -16,42 +16,61 @@ from .webstats.urls import urlpatterns as webstats_urlpatterns
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'^%s$' % settings.PROGRAM_PREFIX, views.program, name='program'),
url(r'^%s(?P<year>\d{4})/(?P<week>\d+)/$' % settings.PROGRAM_PREFIX, views.program, name='program_week'),
url(r'^grille$', views.grid, name='grid'),
url(r'^emissions/$', views.emissions, name='emissions'),
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'^%s$' % settings.EMISSIONS_PREFIX, views.emissions, name='emissions'),
url(
r'^emissions/(?P<emission_slug>[\w,-]+)/(?P<episode_slug>[\w,-]+)/embed/(?P<pk>\d+)/$',
r'^%s(?P<slug>[\w,-]+)/episodes/$' % settings.EMISSIONS_PREFIX,
views.emissionEpisodes,
name='emissionEpisodes',
),
url(
r'^%s(?P<slug>[\w,-]+)/podcasts.rss' % settings.EMISSIONS_PREFIX,
views.emission_podcasts_feed,
name='emission-podcasts',
),
url(r'^%s(?P<slug>[\w,-]+)/chat/$' % settings.EMISSIONS_PREFIX, views.chat, name='emission-chat'),
url(
r'^%s(?P<emission_slug>[\w,-]+)/(?P<slug>[\w,-]+)/$' % settings.EMISSIONS_PREFIX,
views.episode,
name='episode-view',
),
url(
r'^%s(?P<emission_slug>[\w,-]+)/(?P<episode_slug>[\w,-]+)/embed/(?P<pk>\d+)/$'
% settings.EMISSIONS_PREFIX,
views.soundfile_embed,
name='soundfile-embed-view',
),
url(
r'^emissions/(?P<emission_slug>[\w,-]+)/(?P<episode_slug>[\w,-]+)/dlg-embed/(?P<pk>\d+)/$',
r'^%s(?P<emission_slug>[\w,-]+)/(?P<episode_slug>[\w,-]+)/dlg-embed/(?P<pk>\d+)/$'
% settings.EMISSIONS_PREFIX,
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]+)/$',
r'^%s(?P<slug>[\w,-]+)/playlist/(?P<year>[0-9]{4})-(?P<month>[-\w]+)-(?P<day>[0-9]+)/$'
% settings.EMISSIONS_PREFIX,
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'^%s(?P<slug>[\w,-]+)/$' % settings.EMISSIONS_PREFIX, views.emission, name='emission-view'),
url(r'^%sarchives$' % settings.EMISSIONS_PREFIX, views.emissionsArchives, name='emissionsArchives'),
url(r'^sons/$', RedirectView.as_view(url='/podcasts/'), name='listen'),
url(r'^sons-old/$', views.listen),
url(r'^podcasts/archives/$', search.listenArchives, name='listenArchives'),
url(r'^actus/$', views.news, name='news'),
url(r'^actus/agenda/$', views.agenda, name='agenda'),
url(r'^%s$' % settings.NEWSITEMS_PREFIX, views.news, name='news'),
url(r'^%sagenda/$' % settings.NEWSITEMS_PREFIX, views.agenda, name='agenda'),
url(
r'^%sagenda/(?P<year>[0-9]{4})/(?P<month>[0-9]+)/$' % settings.NEWSITEMS_PREFIX,
views.agenda_by_month,
name='agenda_by_month',
),
url(
r'^actus/agenda/(?P<year>[0-9]{4})/(?P<month>[0-9]+)/$', views.agenda_by_month, name='agenda_by_month'
r'^%sagenda$' % settings.NEWSITEMS_PREFIX, RedirectView.as_view(pattern_name='agenda', permanent=True)
),
url(r'^actus/agenda$', RedirectView.as_view(pattern_name='agenda', permanent=True)),
url(r'^actus/archives/$', search.newsArchives, name='newsArchives'),
url(r'^actus/(?P<slug>[\w,-]+)$', views.newsitemview, name='newsitem-view'),
url(r'^%sarchives/$' % settings.NEWSITEMS_PREFIX, search.newsArchives, name='newsArchives'),
url(r'^%s(?P<slug>[\w,-]+)$' % settings.NEWSITEMS_PREFIX, views.newsitemview, name='newsitem-view'),
url(r'^party$', views.party, name='party'),
url(r'^recherche/$', search.view, name='search'),
url(r'^actus.rss$', views.rss_news_feed, name='rss-feed'),
......
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