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 <alekratz@gmail.com>
This commit is contained in:
@@ -136,7 +136,7 @@ class PostCreateView(CreateView):
|
|||||||
form_class = PostForm
|
form_class = PostForm
|
||||||
slug_field = "url"
|
slug_field = "url"
|
||||||
slug_url_kwarg = "url"
|
slug_url_kwarg = "url"
|
||||||
template_name = "board/post_create_view.html"
|
template_name = "board/post_create.html"
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
context = super().get_context_data(**kwargs)
|
context = super().get_context_data(**kwargs)
|
||||||
@@ -161,7 +161,7 @@ class PostCreateView(CreateView):
|
|||||||
class PostModifyView(PermissionRequiredMixin, edit.UpdateView):
|
class PostModifyView(PermissionRequiredMixin, edit.UpdateView):
|
||||||
model = Post
|
model = Post
|
||||||
form_class = PostModifyForm
|
form_class = PostModifyForm
|
||||||
template_name = "board/post_modify_view.html"
|
template_name = "board/post_modify.html"
|
||||||
success_url = reverse_lazy("board:post_modify_success")
|
success_url = reverse_lazy("board:post_modify_success")
|
||||||
|
|
||||||
def has_permission(self) -> bool:
|
def has_permission(self) -> bool:
|
||||||
@@ -196,7 +196,7 @@ class ReplyCreateView(CreateView):
|
|||||||
form_class = ReplyForm
|
form_class = ReplyForm
|
||||||
slug_field = "url"
|
slug_field = "url"
|
||||||
slug_url_kwarg = "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")
|
success_url = reverse_lazy("board:post_success")
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
|
|||||||
Reference in New Issue
Block a user