1

My django admin was working fine, but now jquery wont load for the datepickers etc. The browser console show the error "$" is not a function. This started after I had installed and then uninstalled the grappelli library. My admin files are on S3 so i deleted them all and ran collectstatic again, but this did not help. I also cleared the browser cache to be sure. Really have no idea how to solve this one - any help would be appreciated.

I'm on django 1.8.5

RunLoop
  • 20,288
  • 21
  • 96
  • 151

2 Answers2

2

The issue turned out to be that grappelli on installation, overwrote the jquery and related files of the admin. My admin files are on S3/Cloudfront so I had to run collectstatic again after uninstalling grappelli and also invalidate the cloudfront cache of the admin. Grappelli turned out to be a very painful experience...

RunLoop
  • 20,288
  • 21
  • 96
  • 151
0

I had the same problem and I solved it by editing nginx config. Before:

location /static/admin/ { alias /web/merv/env/lib/python3.4/site-packages/django/contrib/admin/static/admin/; }

location /static/ { alias /web/merv/files/static/; }

After:

location /static/ { alias /web/merv/files/static/; }
MikeS
  • 1,058
  • 1
  • 10
  • 19