From 3144d8625417d28d65d28a56b62388337e13380a Mon Sep 17 00:00:00 2001 From: sonny Date: Thu, 21 May 2020 13:47:58 +0200 Subject: [PATCH] Refactor news:collection template paths --- .../{collection => news/collection/views}/import.html | 0 .../collection/views}/rule-create.html | 0 .../collection/views}/rule-update.html | 0 .../{collection => news/collection/views}/rules.html | 0 src/newsreader/news/collection/views.py | 8 ++++---- 5 files changed, 4 insertions(+), 4 deletions(-) rename src/newsreader/news/collection/templates/{collection => news/collection/views}/import.html (100%) rename src/newsreader/news/collection/templates/{collection => news/collection/views}/rule-create.html (100%) rename src/newsreader/news/collection/templates/{collection => news/collection/views}/rule-update.html (100%) rename src/newsreader/news/collection/templates/{collection => news/collection/views}/rules.html (100%) diff --git a/src/newsreader/news/collection/templates/collection/import.html b/src/newsreader/news/collection/templates/news/collection/views/import.html similarity index 100% rename from src/newsreader/news/collection/templates/collection/import.html rename to src/newsreader/news/collection/templates/news/collection/views/import.html diff --git a/src/newsreader/news/collection/templates/collection/rule-create.html b/src/newsreader/news/collection/templates/news/collection/views/rule-create.html similarity index 100% rename from src/newsreader/news/collection/templates/collection/rule-create.html rename to src/newsreader/news/collection/templates/news/collection/views/rule-create.html diff --git a/src/newsreader/news/collection/templates/collection/rule-update.html b/src/newsreader/news/collection/templates/news/collection/views/rule-update.html similarity index 100% rename from src/newsreader/news/collection/templates/collection/rule-update.html rename to src/newsreader/news/collection/templates/news/collection/views/rule-update.html diff --git a/src/newsreader/news/collection/templates/collection/rules.html b/src/newsreader/news/collection/templates/news/collection/views/rules.html similarity index 100% rename from src/newsreader/news/collection/templates/collection/rules.html rename to src/newsreader/news/collection/templates/news/collection/views/rules.html diff --git a/src/newsreader/news/collection/views.py b/src/newsreader/news/collection/views.py index 3580951..6fb88df 100644 --- a/src/newsreader/news/collection/views.py +++ b/src/newsreader/news/collection/views.py @@ -48,21 +48,21 @@ class CollectionRuleDetailMixin: class CollectionRuleListView(CollectionRuleViewMixin, ListView): paginate_by = 50 - template_name = "collection/rules.html" + template_name = "news/collection/views/rules.html" context_object_name = "rules" class CollectionRuleUpdateView( CollectionRuleViewMixin, CollectionRuleDetailMixin, UpdateView ): - template_name = "collection/rule-update.html" + template_name = "news/collection/views/rule-update.html" context_object_name = "rule" class CollectionRuleCreateView( CollectionRuleViewMixin, CollectionRuleDetailMixin, CreateView ): - template_name = "collection/rule-create.html" + template_name = "news/collection/views/rule-create.html" class CollectionRuleBulkView(FormView): @@ -122,7 +122,7 @@ class CollectionRuleBulkDeleteView(CollectionRuleBulkView): class OPMLImportView(FormView): form_class = OPMLImportForm success_url = reverse_lazy("news:collection:rules") - template_name = "collection/import.html" + template_name = "news/collection/views/import.html" def form_valid(self, form): user = self.request.user