I know this has been asked before, but I\'m having a hard time setting up JS on my Django web app, even though I\'m reading the documentation.
I\'m running the Django de
I serve javascript via static. So I have something in my urls.py like
(r'^static/(?P.*)$', 'django.views.static.serve', {'document_root': os.getenv('STATIC_DIR')})
So JS urls look like /static/js/blah.js
, CSS urls look like /static/css/blah.css
, etc. I have Apache handle the static directory when running in production to avoid any issues with Django's static serving mechanism.