Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django 1.11 #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions project/redirectors.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from django.http import HttpResponse, HttpResponseRedirect
from django.http import HttpResponseRedirect


def tv_channel_schedule(request, key):
return HttpResponseRedirect("http://tv.azpm.org/schedules/%s/" % key)



def tv_episode_detail(request, id):
return HttpResponseRedirect("http://tv.azpm.org/schedules/episode/%d/" % int(id))
return HttpResponseRedirect("http://tv.azpm.org/schedules/episode/%d/" % int(id))
20 changes: 10 additions & 10 deletions project/urls.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
from django.conf.urls import *
from django.conf.urls import url, include
from django.contrib import admin
from libscampi.contrib import cms
from libscampi.contrib.cms.sites import site
from project import redirectors

admin.autodiscover()

urlpatterns = patterns('',
(r'^comments/', include('django.contrib.comments.urls')),
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
(r'^admin/', include(admin.site.urls)),
url(r'^tv-schedule-forward/(?P<key>\w+)/$', 'project.redirectors.tv_channel_schedule', name="channel-today"),
url(r'^tv-episode-forward/(?P<id>\w+)/$', 'project.redirectors.tv_episode_detail', name="episode-detail"),
(r'', include(cms.site.urls))
)
urlpatterns = [
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
url(r'^admin/', include(admin.site.urls)),
url(r'^tv-schedule-forward/(?P<key>\w+)/$', redirectors.tv_channel_schedule, name="channel-today"),
url(r'^tv-episode-forward/(?P<id>\w+)/$', redirectors.tv_episode_detail, name="episode-detail"),
url(r'', include(site.urls))
]