From 712cd2a1294300ac0a205e5bd8f6a3f52f4f6a44 Mon Sep 17 00:00:00 2001 From: Stephan Telling Date: Sat, 28 Jan 2017 19:30:52 +0100 Subject: [PATCH] use {camp-slug}_*.html for all templates --- ...tail_bornhack-2016.html => bornhack-2016_camp_detail.html} | 0 ...tail_bornhack-2017.html => bornhack-2017_camp_detail.html} | 0 camps/views.py | 2 +- ...ornhack-2016.html => bornhack-2016_call_for_speakers.html} | 0 program/views.py | 4 +--- 5 files changed, 2 insertions(+), 4 deletions(-) rename camps/templates/{camp_detail_bornhack-2016.html => bornhack-2016_camp_detail.html} (100%) rename camps/templates/{camp_detail_bornhack-2017.html => bornhack-2017_camp_detail.html} (100%) rename program/templates/{call_for_speakers_bornhack-2016.html => bornhack-2016_call_for_speakers.html} (100%) diff --git a/camps/templates/camp_detail_bornhack-2016.html b/camps/templates/bornhack-2016_camp_detail.html similarity index 100% rename from camps/templates/camp_detail_bornhack-2016.html rename to camps/templates/bornhack-2016_camp_detail.html diff --git a/camps/templates/camp_detail_bornhack-2017.html b/camps/templates/bornhack-2017_camp_detail.html similarity index 100% rename from camps/templates/camp_detail_bornhack-2017.html rename to camps/templates/bornhack-2017_camp_detail.html diff --git a/camps/views.py b/camps/views.py index d83c7527..6bf4fd03 100644 --- a/camps/views.py +++ b/camps/views.py @@ -8,7 +8,7 @@ class CampDetailView(DetailView): slug_url_kwarg = 'camp_slug' def get_template_names(self): - return 'camp_detail_%s.html' % self.get_object().slug + return '%s_camp_detail.html' % self.get_object().slug class CampListView(ListView): diff --git a/program/templates/call_for_speakers_bornhack-2016.html b/program/templates/bornhack-2016_call_for_speakers.html similarity index 100% rename from program/templates/call_for_speakers_bornhack-2016.html rename to program/templates/bornhack-2016_call_for_speakers.html diff --git a/program/views.py b/program/views.py index beb937a7..c112538b 100644 --- a/program/views.py +++ b/program/views.py @@ -98,7 +98,6 @@ class ProgramDayView(CampViewMixin, TemplateView): return context - class EventDetailView(CampViewMixin, DetailView): model = models.Event template_name = 'program_event_detail.html' @@ -106,6 +105,5 @@ class EventDetailView(CampViewMixin, DetailView): class CallForSpeakersView(CampViewMixin, TemplateView): def get_template_names(self): - return 'call_for_speakers_%s.html' % self.camp.slug - + return '%s_call_for_speakers.html' % self.camp.slug