Question

I followed the installation guide for Grappelli:

Installed django-grappelli

$ pip install django-grappelli

Modified settings.py

INSTALLED_APPS = (
  'grappelli',
  'django.contrib.admin',
)

my urls.py

urlpatterns = patterns('',
  (r'^grappelli/', include('grappelli.urls')),
)

And django tells me:

Error: No module named grappelli

What did I forgot ?

Edit

$ pip install django-grappelli

Requirement already satisfied: django-grappelli in /usr/local/lib/python2.6/dist-packages
Installing collected packages: django-grappelli
Successfully installed django-grappelli

$ pip freeze

...
django-grappelli==2.3.5
...

Was it helpful?

Solution

Check if grappelli in your PYTHONPATH. Run this in console:

$ python
>> import grappelli

If this throw ImportError you not installed this package.

OTHER TIPS

Had the same error. Problem was missing __init__.py file in package directory

I had the same problem.

The documentation does not mention that you need to add the following to urls.py:

import grappelli

make sure you spell Grappelli with two 'P's and two 'L's - tis worked for me!

Try pip3 install django-grappelli It helped me on Linux.

I had this problem in Django (Ubuntu 16, PyCharm), try first:

sudo pip3 uninstall django-grappelli==2.13.4

after you should copy folder grappelli from:

/usr/local/lib/python3.5/dist-packages/

to:

/your_project/venv/python3.5/site-packages/

after check in Python console:

>> import grappelli

Make sure to do:sudo pip install django-grappelli. I didn't install it as root and that messed up the whole process.

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