mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-30 22:29:32 +00:00
Some small clean up and refactoring
Signed-off-by: Skia <skia@libskia.so>
This commit is contained in:
1 parent
2925cde8ab
commit
ce46a9d9da
4 files changed
+38
-44
No files matched your search
@@ -166,11 +166,6 @@ class ForumTopicCreateView(CanCreateMixin, CreateView):
|
||||
form.instance.author = self.request.user
|
||||
return super(ForumTopicCreateView, self).form_valid(form)
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
kwargs = super(ForumTopicCreateView, self).get_context_data(**kwargs)
|
||||
kwargs['syntax_help_page'] = Page.get_page_by_full_name(settings.SITH_CORE_PAGE_SYNTAX)
|
||||
return kwargs
|
||||
|
||||
class ForumTopicEditView(CanEditMixin, UpdateView):
|
||||
model = ForumTopic
|
||||
fields = ['forum']
|
||||
@@ -225,7 +220,6 @@ class ForumMessageEditView(CanEditMixin, UpdateView):
|
||||
def get_context_data(self, **kwargs):
|
||||
kwargs = super(ForumMessageEditView, self).get_context_data(**kwargs)
|
||||
kwargs['topic'] = self.object.topic
|
||||
kwargs['syntax_help_page'] = Page.get_page_by_full_name(settings.SITH_CORE_PAGE_SYNTAX)
|
||||
return kwargs
|
||||
|
||||
class ForumMessageDeleteView(SingleObjectMixin, RedirectView):
|
||||
@@ -282,6 +276,5 @@ class ForumMessageCreateView(CanCreateMixin, CreateView):
|
||||
def get_context_data(self, **kwargs):
|
||||
kwargs = super(ForumMessageCreateView, self).get_context_data(**kwargs)
|
||||
kwargs['topic'] = self.topic
|
||||
kwargs['syntax_help_page'] = Page.get_page_by_full_name(settings.SITH_CORE_PAGE_SYNTAX)
|
||||
return kwargs
|
||||
|
||||
Reference in new issue
Block a user