Question

I've happily implemented Grappelli for the first time. I was trying to implement the dashboard but it doesn't seem to be activating. Trouble is, I'm not sure what it looks like.

The Grappelli dashboard.py is applied (generated by createdashboard)

settings.py (interesting parts)

MEDIA_ROOT = 'I:/xampp/htdocs/project/media'
MEDIA_URL = 'http://cdn.pd/'
ADMIN_MEDIA_PREFIX = 'http://cdn.project/'
GRAPPELLI_ADMIN_HEADLINE = 'Admin Headline'
GRAPPELLI_INDEX_DASHBOARD = 'pd.dashboard.CustomIndexDashboard'
GRAPPELLI_ADMIN_URL = '/admin/'

TEMPLATE_DIRS = (
    'I:/xampp/htdocs/pd/src/templates'
)

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'grappelli.dashboard',
    'grappelli',
    'django.contrib.admin',
    'south',
)

does anyone have any pointers? Heres a format of my project. Its empty aside from basic django initiation:

project  - pd
         |
         |- dashboard.py
         |- urls.py
         |- settings.py

Any pointers would be cool.

Was it helpful?

Solution

This might be a little late for you. You need also need to add django.core.context_processors.request to TEMPLATE_CONTEXT_PROCESSORS.

settings.py will include:

TEMPLATE_CONTEXT_PROCESSORS = (
"django.contrib.auth.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.media",
"django.contrib.messages.context_processors.messages",
"django.core.context_processors.request"

)

OTHER TIPS

Check if you not customized templates/admin/index.html in your code. I see that grapelli and grappelli.dashboard use different files, but only when you use second one, your dashboard be visible.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top