From 3b39177439e70039d1345bcb49eaa7856d34004e Mon Sep 17 00:00:00 2001 From: fbormann Date: Sun, 23 Oct 2016 14:49:10 -0300 Subject: [PATCH] solved minor issues on topic index.html page --- courses/templates/subject/form_view_teacher.html | 6 +++--- courses/templates/topic/index.html | 40 +++++++++++++++++++++++----------------- forum/views.py | 4 +++- 3 files changed, 29 insertions(+), 21 deletions(-) diff --git a/courses/templates/subject/form_view_teacher.html b/courses/templates/subject/form_view_teacher.html index 6f42b30..32e9b17 100644 --- a/courses/templates/subject/form_view_teacher.html +++ b/courses/templates/subject/form_view_teacher.html @@ -4,7 +4,7 @@ - + {% endblock %}
@@ -55,7 +55,7 @@ - -{% empty %} - {% trans 'No activity found' %} -{% endfor %} -
diff --git a/forum/views.py b/forum/views.py index e8ed7b3..ad4501e 100644 --- a/forum/views.py +++ b/forum/views.py @@ -151,7 +151,7 @@ def load_posts(request, forum_id): return render(request, 'post/post_list.html', context) -class CreatePostView(LoginRequiredMixin, generic.edit.CreateView): +class CreatePostView(LoginRequiredMixin, generic.edit.CreateView, NotificationMixin): login_url = reverse_lazy("core:home") redirect_field_name = 'next' @@ -162,6 +162,8 @@ class CreatePostView(LoginRequiredMixin, generic.edit.CreateView): self.object.user = self.request.user self.object.save() + #super(CreatePostView, self).createNotification(self.object.user.username + " posted on " + self.object.forum,name, + #resource_slug = self.object.forum.slug, actor=self.request.user, users= self.object.forum.topic.) return super(CreatePostView, self).form_valid(form) -- libgit2 0.21.2