Exemplo n.º 1
0
 def context(self, data, check, mutator):
     list_query = project_logic.getProjectsQuery(program=data.program)
     return {
         'page_name': 'Projects list page',
         'list': projects_list.ProjectList(data,
                                           list_query,
                                           idx=self.LIST_IDX),
     }
Exemplo n.º 2
0
 def jsonContext(self, data, check, mutator):
     list_query = project_logic.getProjectsQuery(program=data.program)
     list_content = projects_list.ProjectList(
         data, list_query, idx=self.LIST_IDX).getListData()
     if list_content:
         return list_content.content()
     else:
         raise exception.Forbidden(
             message='You do not have access to this data')