Customizing Django Admin Landing Page

From Littledamien Wiki
Revision as of 05:29, 1 December 2015 by Video8 (talk | contribs) (Created page with "Category:Django Category:Python Category:CMS Category:Web Development == Configuring Grappelli dashboard == * Use [http://django-grappelli.readthedocs.org/en/...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Configuring Grappelli dashboard[edit]

Create a stub Grappelli dashboard with

$ python manage.py customdashboard myproject/dashboard.py

Then edit the dashboard.py file to customize the arrangement of the Admin dashboard.

Custom display order of apps and models[edit]

Edit myproject/dashboard.py to override the default display of apps and models.[1]

self.children.append(modules.ModelList(
            title='Clients',
            collapsible=True,
            column=1,
            css_classes=('collapse open',),
            models=(
                'clients.models.Client',
                'contact_info.models.Person',
                'contact_info.models.Address',
                'contact_info.models.Email',
                'contact_info.models.Phone',
                'contact_info.models.State',
                'contact_info.models.Country',
            ),
        ))


Notes[edit]

  1. Dashboard API - Grappelli documentation