slugify episode name into url
This commit is contained in:
parent
1f71c26fe7
commit
c6672da6c6
@ -30,7 +30,7 @@
|
||||
<div class="season-name">{% if season.name %}{{season.number}} - {{season.name}}{% else %}Season {{season.number}}{%endif%}</div>
|
||||
<div class="episodes">
|
||||
{% for episode in season.episodes.all %}
|
||||
<a class="episode" data-season="{{season.number}}" data-number="{{episode.episode}}" data-title="{{episode.name}}" href="episode/{{season.number}}/{{episode.episode}}">{{episode.episode}} - {{episode.name}}
|
||||
<a class="episode" data-season="{{season.number}}" data-number="{{episode.episode}}" data-title="{{episode.name}}" href="episode/{{season.number}}/{{episode.episode}}-{{episode.name|slugify}}">{{episode.episode}} - {{episode.name}}
|
||||
<span class="submission_cnt">{{episode.submissions.all|length}} Available Links</span>
|
||||
</a>
|
||||
{% endfor %}
|
||||
|
@ -20,6 +20,6 @@ from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^$', views.IndexView.as_view()),
|
||||
url(r'^episode/(?P<season>\d{1,4})/(?P<episode>\d{1,4})/?$', views.EpisodeView.as_view()),
|
||||
url(r'^episode/(?P<season>\d{1,4})/(?P<episode>\d{1,4})(-[\w-]+)?/?$', views.EpisodeView.as_view()),
|
||||
url(r'^vote/(?P<subid>\d+)/(?P<positive>[0-1])/?$', views.SubmissionVoteSubmit.as_view())
|
||||
]
|
||||
|
Reference in New Issue
Block a user