views.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:amadeuslms 作者: amadeusproject 项目源码 文件源码
def get_success_url(self):
        messages.success(self.request, _('The bulletin "%s" was removed successfully from virtual environment "%s"!')%(self.object.name, self.object.topic.subject.name))

        self.log_context['category_id'] = self.object.topic.subject.category.id
        self.log_context['category_name'] = self.object.topic.subject.category.name
        self.log_context['category_slug'] = self.object.topic.subject.category.slug
        self.log_context['subject_id'] = self.object.topic.subject.id
        self.log_context['subject_name'] = self.object.topic.subject.name
        self.log_context['subject_slug'] = self.object.topic.subject.slug
        self.log_context['topic_id'] = self.object.topic.id
        self.log_context['topic_name'] = self.object.topic.name
        self.log_context['topic_slug'] = self.object.topic.slug
        self.log_context['bulletin_id'] = self.object.id
        self.log_context['bulletin_name'] = self.object.name
        self.log_context['bulletin_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.topic.subject.slug})
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号