def get_success_url(self):
messages.success(self.request, _('Topic "%s" was removed from virtual enviroment "%s" successfully!')%(self.object.name, self.object.subject.name))
self.log_context['category_id'] = self.object.subject.category.id
self.log_context['category_name'] = self.object.subject.category.name
self.log_context['category_slug'] = self.object.subject.category.slug
self.log_context['subject_id'] = self.object.subject.id
self.log_context['subject_name'] = self.object.subject.name
self.log_context['subject_slug'] = self.object.subject.slug
self.log_context['topic_id'] = self.object.id
self.log_context['topic_name'] = self.object.name
self.log_context['topic_slug'] = self.object.slug
super(DeleteView, self).createLog(self.request.user, self.log_component, self.log_action, self.log_resource, self.log_context)
return reverse_lazy('subjects:view', kwargs = {'slug': self.object.subject.slug})
评论列表
文章目录