From 6ff64a329904434aed19c3503c8c7a05d1f47c1c Mon Sep 17 00:00:00 2001 From: Alek Ratzloff Date: Wed, 13 Jul 2022 13:16:57 -0700 Subject: [PATCH] Rename {post_create,post_modify,reply_create}_view.html This drops the _view suffix of each of these, makes it more consistent and less of a chore to type. Signed-off-by: Alek Ratzloff --- .../board/{post_create_view.html => post_create.html} | 0 .../board/{post_modify_view.html => post_modify.html} | 0 .../board/{reply_create_view.html => reply_create.html} | 0 board/views.py | 6 +++--- 4 files changed, 3 insertions(+), 3 deletions(-) rename board/templates/board/{post_create_view.html => post_create.html} (100%) rename board/templates/board/{post_modify_view.html => post_modify.html} (100%) rename board/templates/board/{reply_create_view.html => reply_create.html} (100%) diff --git a/board/templates/board/post_create_view.html b/board/templates/board/post_create.html similarity index 100% rename from board/templates/board/post_create_view.html rename to board/templates/board/post_create.html diff --git a/board/templates/board/post_modify_view.html b/board/templates/board/post_modify.html similarity index 100% rename from board/templates/board/post_modify_view.html rename to board/templates/board/post_modify.html diff --git a/board/templates/board/reply_create_view.html b/board/templates/board/reply_create.html similarity index 100% rename from board/templates/board/reply_create_view.html rename to board/templates/board/reply_create.html diff --git a/board/views.py b/board/views.py index 1bb379b..820d3b2 100644 --- a/board/views.py +++ b/board/views.py @@ -136,7 +136,7 @@ class PostCreateView(CreateView): form_class = PostForm slug_field = "url" slug_url_kwarg = "url" - template_name = "board/post_create_view.html" + template_name = "board/post_create.html" def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) @@ -161,7 +161,7 @@ class PostCreateView(CreateView): class PostModifyView(PermissionRequiredMixin, edit.UpdateView): model = Post form_class = PostModifyForm - template_name = "board/post_modify_view.html" + template_name = "board/post_modify.html" success_url = reverse_lazy("board:post_modify_success") def has_permission(self) -> bool: @@ -196,7 +196,7 @@ class ReplyCreateView(CreateView): form_class = ReplyForm slug_field = "url" slug_url_kwarg = "url" - template_name = "board/reply_create_view.html" + template_name = "board/reply_create.html" success_url = reverse_lazy("board:post_success") def get_context_data(self, **kwargs):