I have created a Django app and just deployed it to a server. I use some extra django features such as the django-debug-toolbar which was installed from my requirements.txt file using pip
.
When I run my app locally, on localhost, everything works fine and the extra features are loaded successfully.
Here is the right structure of the sources loaded:
But when I run my app from the server for some reason the paths are not correct.
And in my browser's console I get these errors:
All these paths are from the installed packages like the django-debug-toolbar and it wouldn't make sense to change them. For example, the toolbar.js
file is loaded with this command:
<script src="{% static 'debug_toolbar/js/toolbar.js' %}"></script>
which can be found in the:
lib/python2.7/site-packages/debug_toolbar/templates/debug_toolbar/base.html
file, which was created after I installed all the packages from my requirements.txt file.
That should work fine. It does work fine when I run it locally, but it doesn't when I run on the new server. Any ideas?