views.py 文件源码

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

项目:WSIL 作者: criticalerrors 项目源码 文件源码
def get_context_data(self, **kwargs):
        context = super(DetailView, self).get_context_data(**kwargs)
        fw_name = context['object'].name
        try:
            details = Features.objects.get(library_framework_name=fw_name)
            fields = [(i.help_text,getattr(details, i.name)) for i in details._meta.fields if len(i.help_text) > 0]
            context['details'] = fields
        except:
            pass

        context['question_count'] = QuestionOnIt.get_count_for_lang(fw_name).count
        context['jobs'] = Job.get_all_job_for(fw_name)
        context['courses'] = Course.get_courses_for_lang(fw_name)
        return context
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号