1 # -*- encoding: utf-8 -*
4 This file was generated with the customdashboard management command, it
5 contains the two classes for the main dashboard and app index dashboard.
6 You can customize these classes as you want.
8 To activate your index dashboard add the following to your settings.py::
9 ADMIN_TOOLS_INDEX_DASHBOARD = 'SIGMA.dashboard.CustomIndexDashboard'
11 And to activate the app index dashboard::
12 ADMIN_TOOLS_APP_INDEX_DASHBOARD = 'SIGMA.dashboard.CustomAppIndexDashboard'
15 from django
.utils
.translation
import ugettext_lazy
as _
16 from django
.core
.urlresolvers
import reverse
18 from admin_tools
.dashboard
import modules
, Dashboard
, AppIndexDashboard
19 from admin_tools
.utils
import get_admin_site_name
22 class CustomIndexDashboard(Dashboard
):
24 Custom index dashboard for SIGMA.
26 def init_with_context(self
, context
):
27 site_name
= get_admin_site_name(context
)
29 # append an app list module for "Applications"
30 self
.children
.append(modules
.AppList(
32 exclude
=('django.contrib.*',
33 'project.rh.models.AyantDroit',
34 'project.rh.models.Classement',
35 'project.rh.models.Devise',
36 'project.rh.models.FamilleEmploi',
37 'project.rh.models.OrganismeBstg',
38 'project.rh.models.Responsable',
39 'project.rh.models.Service',
40 'project.rh.models.Statut',
41 'project.rh.models.TauxChange',
42 'project.rh.models.TypeContrat',
43 'project.rh.models.TypePoste',
44 'project.rh.models.TypeRevalorisation',
45 'project.rh.models.TypeRemuneration',
46 'project.rh.models.ValeurPoint',
50 # append an app list module for "Administration"
51 self
.children
.append(modules
.AppList(
53 models
=('django.contrib.*',),
56 # append a recent actions module
57 self
.children
.append(modules
.RecentActions(_('Recent Actions'), 5))