using django grappelli dashboard with dotcloud
-
29-05-2021 - |
Question
I'm trying to set up admin with grappelli on dotcloud services. I've got that all up and running fine however when I try and add a custom dashboard to the equation, I get errors stating:
ImportError at /admin/
No module named dashboard
However I have installed the django-grappelli as required and it is working without dashboard. All the requisites for dashboard should be there.
INSTALLED_APPS = (
'grappelli.dashboard',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'grappelli',
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
)
GRAPPELLI_INDEX_DASHBOARD = 'www.dashboard.CustomIndexDashboard'
Solution 2
It's a little easier to solve than I first thought.
I basically just added the files for grappelli to the project rather than depending on dotcloud to install the dependencies.
Now it works fine.
OTHER TIPS
We might need a little bit more context here. But I would first look at the following in your Django settings:
Check
INSTALLED_APPS
and make sure that you specifygrappelli.dashboard
and not justdashboard
.Check
GRAPPELLI_INDEX_DASHBOARD
and make sure that you specify the full path to your custom dashboard module; e.g. if the class isMyDashboard
in thedashboard.py
file in yourmyapp
directory, it should bemyapp.dashboard.MyDashboard
.