From c6672da6c63bf2b814f78a8ac8372d135ef69426 Mon Sep 17 00:00:00 2001 From: Evert Date: Sat, 11 Nov 2017 12:53:25 +0200 Subject: [PATCH] slugify episode name into url --- Show/templates/show.html | 2 +- Show/urls.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Show/templates/show.html b/Show/templates/show.html index 8edd791..e9b052c 100644 --- a/Show/templates/show.html +++ b/Show/templates/show.html @@ -30,7 +30,7 @@
{% if season.name %}{{season.number}} - {{season.name}}{% else %}Season {{season.number}}{%endif%}
{% for episode in season.episodes.all %} - {{episode.episode}} - {{episode.name}} + {{episode.episode}} - {{episode.name}} {{episode.submissions.all|length}} Available Links {% endfor %} diff --git a/Show/urls.py b/Show/urls.py index 2bfc217..2817b0e 100644 --- a/Show/urls.py +++ b/Show/urls.py @@ -20,6 +20,6 @@ from . import views urlpatterns = [ url(r'^$', views.IndexView.as_view()), - url(r'^episode/(?P\d{1,4})/(?P\d{1,4})/?$', views.EpisodeView.as_view()), + url(r'^episode/(?P\d{1,4})/(?P\d{1,4})(-[\w-]+)?/?$', views.EpisodeView.as_view()), url(r'^vote/(?P\d+)/(?P[0-1])/?$', views.SubmissionVoteSubmit.as_view()) ]