add visualisation pieces
[auf_rh_dae.git] / project / dashboard.py
CommitLineData
8846b99e
OL
1# -*- encoding: utf-8 -*
2
3"""
4This file was generated with the customdashboard management command, it
5contains the two classes for the main dashboard and app index dashboard.
6You can customize these classes as you want.
7
8To activate your index dashboard add the following to your settings.py::
9 ADMIN_TOOLS_INDEX_DASHBOARD = 'SIGMA.dashboard.CustomIndexDashboard'
10
11And to activate the app index dashboard::
12 ADMIN_TOOLS_APP_INDEX_DASHBOARD = 'SIGMA.dashboard.CustomAppIndexDashboard'
13"""
14
15from django.utils.translation import ugettext_lazy as _
16from django.core.urlresolvers import reverse
17
18from admin_tools.dashboard import modules, Dashboard, AppIndexDashboard
19from admin_tools.utils import get_admin_site_name
20
21
22class CustomIndexDashboard(Dashboard):
23 """
24 Custom index dashboard for SIGMA.
25 """
26 def init_with_context(self, context):
27 site_name = get_admin_site_name(context)
28
29 # append an app list module for "Applications"
30 self.children.append(modules.AppList(
31 _('Applications'),
56fdab08
OL
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',
47 ),
8846b99e
OL
48 ))
49
50 # append an app list module for "Administration"
51 self.children.append(modules.AppList(
52 _('Administration'),
53 models=('django.contrib.*',),
54 ))
55
56 # append a recent actions module
57 self.children.append(modules.RecentActions(_('Recent Actions'), 5))