Fix Django Grappelli Dropdown actions() not found / exists


I found this issues already there quite sometimes. When opening Django admin Grappelli and found error:

$(“tr input.action-select”).actions();

Here are checklist we should do:

1. Make sure we have right order in loading django-grappelli before `django.contrib.admin`
2. Correct STATICFILES_FINDERS :

1
2
3
4
5
6
7
# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS = (
    ‘django.contrib.staticfiles.finders.AppDirectoriesFinder’,
    ‘django.contrib.staticfiles.finders.FileSystemFinder’,
    #    ‘django.contrib.staticfiles.finders.DefaultStorageFinder’,
)

3. Make sure static files can be accessed from browser.

Now, here is the solution to fix django-grappelli issues:

1. Copy django admin to static

1
cp -dR /usr/local/lib/python2.7/dist-packages/django/contrib/admin/static/admin /<project-django>/static/

2. Overwrite admin with grappelli admin

1
cp -dR /usr/local/lib/python2.7/dist-packages/grappelli/static/admin/ /<project-django>/static/

3. Restart your NGINX and refresh browser


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.