Exemple #1
0
    def get_context_data(self, **kwargs):
        from ra.admin.admin import ra_admin_site
        from ra.admin.helpers import get_each_context

        context = super(ReportList, self).get_context_data(**kwargs)

        context['reports'] = self.get_reports_map()

        v, vp, page_title, opts = self.get_meta_data()
        context['verbose_name'] = v
        context['verbose_name_plural'] = vp
        context['page_title'] = page_title
        context['title'] = page_title

        context['opts'] = opts

        context['RA_ADMIN_SITE_NAME'] = app_settings.RA_ADMIN_SITE_NAME
        context['has_detached_sidebar'] = True
        context['RA_ADMIN_SITE_NAME'] = app_settings.RA_ADMIN_SITE_NAME

        extra_context = get_each_context(self.request, ra_admin_site)
        context.update(extra_context)
        return context
Exemple #2
0
 def each_context(self, request):
     context = super(RaAdminSiteBase, self).each_context(request)
     context['RA_ADMIN_SITE_NAME'] = app_settings.RA_ADMIN_SITE_NAME
     context.update(get_each_context(request, self))
     return context