Exemplo n.º 1
0
 def get_context_data(self, **kwargs):
     context = super(DetailProjectView, self).get_context_data(**kwargs)
     project = self.get_data()
     table = project_tables.TenantsTable(self.request)
     context["project"] = project
     context["url"] = reverse(INDEX_URL)
     context["actions"] = table.render_row_actions(project)
     return context
Exemplo n.º 2
0
    def get_context_data(self, **kwargs):
        context = super(DetailProjectView, self).get_context_data(**kwargs)
        project = self.get_data()
        table = project_tables.TenantsTable(self.request)
        context["project"] = project
        context["url"] = reverse(INDEX_URL)
        context["actions"] = table.render_row_actions(project)

        if keystone.VERSIONS.active >= 3:
            extra_info = getattr(settings, 'PROJECT_TABLE_EXTRA_INFO', {})
            context['extras'] = dict(
                (display_key, getattr(project, key, ''))
                for key, display_key in extra_info.items())
        return context