From b23c473e3af9e7c4e5c7aee6bfc93cde40737d94 Mon Sep 17 00:00:00 2001
From: Christian Pointner <equinox@helsinki.at>
Date: Mon, 1 Mar 2021 11:44:28 +0100
Subject: fix vew names and url tag parameters for v2 templates


diff --git a/program/templates/v2/current_show.html b/program/templates/v2/current_show.html
index 3ffe8c4..ab5f843 100644
--- a/program/templates/v2/current_show.html
+++ b/program/templates/v2/current_show.html
@@ -10,7 +10,7 @@
         <li id="previous" class="bf-{{ previous_timeslot.show.broadcastformat.slug }}">
             <div class="time">{{ previous_timeslot.start|date:"H:i" }}</div>
             <div class="show-name">
-                <a href="{% url "timeslot-detail" previous_timeslot.id %}">{{ previous_timeslot.show.name }}</a>
+                <a href="{% url "timeslot-detail-v2" previous_timeslot.id %}">{{ previous_timeslot.show.name }}</a>
             </div>
             <div class="show-content">
             </div>
@@ -20,7 +20,7 @@
         <li id="current" class="bf-{{ current_timeslot.show.broadcastformat.slug }}">
             <div class="time">{{ current_timeslot.start|date:"H:i" }}</div>
             <div class="show-name">
-                <a href="{% url "timeslot-detail" current_timeslot.id %}">{{ current_timeslot.show.name }}</a>
+                <a href="{% url "timeslot-detail-v2" current_timeslot.id %}">{{ current_timeslot.show.name }}</a>
             </div>
             <div class="show-content">
 {%     if current_timeslot.note %}
@@ -35,7 +35,7 @@
         <li id="next" class="bf-{{ next_timeslot.show.broadcastformat.slug }}">
             <div class="time">{{ next_timeslot.start|date:"H:i" }}</div>
             <div class="show-name">
-                <a href="{% url "timeslot-detail" next_timeslot.id %}">{{ next_timeslot.show.name }}</a>
+                <a href="{% url "timeslot-detail-v2" next_timeslot.id %}">{{ next_timeslot.show.name }}</a>
             </div>
             <div class="show-content">
             </div>
@@ -45,7 +45,7 @@
         <li id="after_next" class="bf-{{ after_next_timeslot.show.broadcastformat.slug }}">
             <div class="timer">{{ after_next_timeslot.start|date:"H:i" }}</div>
             <div class="show-name">
-                <a href="{% url "timeslot-detail" after_next_timeslot.id %}">{{ after_next_timeslot.show.name }}</a>
+                <a href="{% url "timeslot-detail-v2" after_next_timeslot.id %}">{{ after_next_timeslot.show.name }}</a>
             </div>
             <div class="show-content">
             </div>
diff --git a/program/templates/v2/day_schedule.html b/program/templates/v2/day_schedule.html
index ceb0bee..4a36bdb 100644
--- a/program/templates/v2/day_schedule.html
+++ b/program/templates/v2/day_schedule.html
@@ -64,7 +64,7 @@
                 </div>
                 <div class="show-detail">
                     <h3 class="show-title"><a
-                            href="{% url "timeslot-detail" timeslot.id %}">{{ timeslot.show.name }}</a></h3>
+                            href="{% url "timeslot-detail-v2" timeslot.id %}">{{ timeslot.show.name }}</a></h3>
                     {% if timeslot.note %}
                         <p class="note-title"><strong>Heute:</strong> {{ timeslot.note.title }}</p>
                     {% else %}
diff --git a/program/templates/v2/host_detail.html b/program/templates/v2/host_detail.html
index e7aad16..1f2782c 100644
--- a/program/templates/v2/host_detail.html
+++ b/program/templates/v2/host_detail.html
@@ -10,7 +10,7 @@
     <div id="shows">
         <div id="shows-title">Sendungen</div>
         {% for show in host.active_shows %}
-            <div class="show {{ show.broadcastformat.slug }}"><a href="{% url "show-detail" show.slug %}"> {{ show.name }}</a></div>
+            <div class="show {{ show.broadcastformat.slug }}"><a href="{% url "show-detail-v2" show.slug %}"> {{ show.name }}</a></div>
         {% endfor %}
     </div>
 
diff --git a/program/templates/v2/host_list.html b/program/templates/v2/host_list.html
index ada9bf1..8353b71 100644
--- a/program/templates/v2/host_list.html
+++ b/program/templates/v2/host_list.html
@@ -9,7 +9,7 @@
     <div class="host-list">
         {% for host in host_list %}
             <div class="host">
-                <a href="{% url "host-detail" host.id %}">{{ host.name }}</a>
+                <a href="{% url "host-detail-v2" host.id %}">{{ host.name }}</a>
             </div>
         {% endfor %}
     </div>
diff --git a/program/templates/v2/recommendation.html b/program/templates/v2/recommendation.html
index 36b7c02..3dfeed2 100644
--- a/program/templates/v2/recommendation.html
+++ b/program/templates/v2/recommendation.html
@@ -10,7 +10,7 @@
         <li class="bf-{{ recommendation.show.broadcastformat.slug }}">
             <div class="time">{{ recommendation.start|date:"d.m. H:i" }} - {{ recommendation.end|date:"H:i" }}</td>
             <div class="show-name">
-                <a href="{% url "timeslot-detail" recommendation.id %}">{{ recommendation.show.name }}</a>
+                <a href="{% url "timeslot-detail-v2" recommendation.id %}">{{ recommendation.show.name }}</a>
             </div>
             <div class="show-content">
 {%   if recommendation.note %}
@@ -19,7 +19,7 @@
                 {{ recommendation.show.short_description }}
 {%   endif %}
                 <br/>
-                <a href="{% url "timeslot-detail" recommendation.id %}">[weiter]</a>
+                <a href="{% url "timeslot-detail-v2" recommendation.id %}">[weiter]</a>
             </div>
         </li>
 {% endfor %}
diff --git a/program/templates/v2/recommendation_list.html b/program/templates/v2/recommendation_list.html
index 3fcc5d1..3b6f66d 100644
--- a/program/templates/v2/recommendation_list.html
+++ b/program/templates/v2/recommendation_list.html
@@ -25,16 +25,16 @@
                 </div>
                 <div class="show-detail">
                     <h4>
-                        <a href="{% url "show-detail" recommendation.show.slug %}">{{ recommendation.show.name }}</a><br/>
+                        <a href="{% url "show-detail-v2" recommendation.show.slug %}">{{ recommendation.show.name }}</a><br/>
                         vom {{ recommendation.start|date:"d.m. H:i" }}-{{ recommendation.end|date:"H:i" }}</h4>
                     {% if recommendation.note %}
                         <h3 class="show-title">
-                          <a href="{% url "timeslot-detail" recommendation.id %}">{{ recommendation.note.title }}</a>
+                          <a href="{% url "timeslot-detail-v2" recommendation.id %}">{{ recommendation.note.title }}</a>
                         </h3>
                         <div class="note-content">{{ recommendation.note.content|safe }}</div>
                     {% else %}
                         <h3 class="show-title"><a
-                                href="{% url "timeslot-detail" recommendation.id %}">{{ recommendation.show.broadcastformat.format }}</a>
+                                href="{% url "timeslot-detail-v2" recommendation.id %}">{{ recommendation.show.broadcastformat.format }}</a>
                         </h3>
                     {% endif %}
                 </div>
diff --git a/program/templates/v2/show_detail.html b/program/templates/v2/show_detail.html
index 2e45549..88e439f 100644
--- a/program/templates/v2/show_detail.html
+++ b/program/templates/v2/show_detail.html
@@ -47,7 +47,7 @@
 
     <p>
         {% for host in show.hosts.all %}
-            <a href="{% url "host-detail" host.id %}">{{ host }}</a><br/>
+            <a href="{% url "host-detail-v2" host.id %}">{{ host }}</a><br/>
         {% endfor %}
         {% if show.email %}
             <strong>Email:</strong> <a href="mailto:{{ show.email }}">{{ show.email }}</a><br/>
@@ -63,18 +63,18 @@
         <ul class="recommendations-list">
             {% for note in show.notes.all reversed %}
                 <li>
-                    <a href="{% url "timeslot-detail" note.timeslot.id %}"
+                    <a href="{% url "timeslot-detail-v2" note.timeslot.id %}"
                        title="{{ note.title }}">{{ note.start|date:"d. M Y" }}:</a>
                     <div class="title">{{ note.title }}</div>
                 </li>
             {% endfor %}
             {% if show.predecessor and show.predecessor.notes.all %}
                 {% if show.name != show.predecessor.name %}
-                    <h3>Davor als <a href="{% url "show-detail" show.predecessor.slug %}">{{ show.predecessor.name }}</a></h3>
+                    <h3>Davor als <a href="{% url "show-detail-v2" show.predecessor.slug %}">{{ show.predecessor.name }}</a></h3>
                 {%  endif %}
                 {% for note in show.predecessor.notes.all reversed %}
                     <li>
-                        <a href="{%  url "timeslot-detail" note.timeslot.id %}"
+                        <a href="{%  url "timeslot-detail-v2" note.timeslot.id %}"
                            title="{{ note.title }}">{{ note.start|date:"d. M Y" }}:</a>
                         <div class="title">{{ note.title }}</div>
                     </li>
diff --git a/program/templates/v2/show_list.html b/program/templates/v2/show_list.html
index 6d9d35d..50cae57 100644
--- a/program/templates/v2/show_list.html
+++ b/program/templates/v2/show_list.html
@@ -39,7 +39,7 @@
                     {% endfor %}
                 </div>
                 <div class="show-detail">
-                    <h3 class="show-title"><a href="{% url "show-detail" show.slug %}">{{ show.name }}</a></h3>
+                    <h3 class="show-title"><a href="{% url "show-detail-v2" show.slug %}">{{ show.name }}</a></h3>
                     <ul class="show-programslots">
                         {% for programslot in show.active_program_slots %}
                             <li class="show-programslot">{{ programslot }}</li>
diff --git a/program/templates/v2/timeslot_detail.html b/program/templates/v2/timeslot_detail.html
index 88749a2..b4702da 100644
--- a/program/templates/v2/timeslot_detail.html
+++ b/program/templates/v2/timeslot_detail.html
@@ -8,7 +8,7 @@
 
     <div class="show-detail-header bf-{{ timeslot.show.broadcastformat.slug }}">
         <h1 id="name">
-            <a href="{% url "show-detail" timeslot.show.slug %}">{{ timeslot.show.name }}</a>
+            <a href="{% url "show-detail-v2" timeslot.show.slug %}">{{ timeslot.show.name }}</a>
         </h1>
         {% if timeslot.note %}
             <h2>{{ timeslot.note.title }}</h2>
@@ -42,7 +42,7 @@
 
     <p>
         {% for host in timeslot.show.hosts.all %}
-            <a href="{% url "host-detail" host.id %}">{{ host }}</a><br/>
+            <a href="{% url "host-detail-v2" host.id %}">{{ host }}</a><br/>
         {% endfor %}
         {% if timeslot.show.email %}
             <strong>Email:</strong> <a href="mailto:{{ timeslot.show.email }}">{{ timeslot.show.email }}</a><br/>
diff --git a/program/urls.py b/program/urls.py
index cb389e2..378faf1 100644
--- a/program/urls.py
+++ b/program/urls.py
@@ -27,12 +27,12 @@ urlpatterns = patterns('',
                        url(r'^v2/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/?$', views.DayScheduleViewV2.as_view()),
                        url(r'^v2/current_box/?$', cache_page(60)(views.CurrentShowBoxViewV2.as_view())),
                        url(r'^v2/hosts/?$', views.HostListViewV2.as_view()),
-                       url(r'^v2/hosts/(?P<pk>\d+)/?$', views.HostDetailViewV2.as_view(), name='host-detail'),
+                       url(r'^v2/hosts/(?P<pk>\d+)/?$', views.HostDetailViewV2.as_view(), name='host-detail-v2'),
                        url(r'^v2/tips/?$', views.RecommendationsListViewV2.as_view()),
                        url(r'^v2/tips_box/?$', views.RecommendationsBoxViewV2.as_view()),
                        url(r'^v2/shows/?$', views.ShowListViewV2.as_view()),
-                       url(r'^v2/shows/(?P<slug>[\w-]+)/?$', views.ShowDetailViewV2.as_view(), name='show-detail'),
-                       url(r'^v2/(?P<pk>\d+)/?$', views.TimeSlotDetailViewV2.as_view(), name='timeslot-detail'),
+                       url(r'^v2/shows/(?P<slug>[\w-]+)/?$', views.ShowDetailViewV2.as_view(), name='show-detail-v2'),
+                       url(r'^v2/(?P<pk>\d+)/?$', views.TimeSlotDetailViewV2.as_view(), name='timeslot-detail-v2'),
                        )
 if settings.DEBUG:
     urlpatterns += \
-- 
cgit v0.10.2