コード例 #1
0
ファイル: views.py プロジェクト: FrejaThoresen/CommuniCode
 def get_context_data(self, **kwargs):
     context = super(ProjectTreeView, self).get_context_data(**kwargs)
     project_id = kwargs.get('project_id')
     project = wrappers.get_project(int(project_id))
     if not project:
         raise Http404
     context['project'] = project
     return context
コード例 #2
0
 def get_context_data(self, **kwargs):
     context = super(ProjectCodeView, self).get_context_data(**kwargs)
     project_id = kwargs.get('project_id')
     project = wrappers.get_project(int(project_id))
     if not project:
         raise Http404
     context['project'] = project
     context['last_commit'] = wrappers.get_commit(project_id, 'master')
     return context