I’m running an old branch A from my GitHub repo, and Django is not picking up any of the static files. What’s weird is that if I make any text changes to the templates, it doesn’t pick those up either. I’ve tried refreshing the page, opening Chrome in Incognito, restarting the server, etc. — nothing is working.
After running the development server in a different branch B, and switching back to this one, Django acted as if I was still running on branch B (got not 404 errors):
$ ./manage.py runserver
0 errors found
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
[12/Sep/2012 23:25:48] "GET /interviews/ HTTP/1.1" 200 13295
But as soon as I restarted the server, it reverted to the un-changed version of branch A (none of the changes were picked up and no static files could be found):
$ ./manage.py runserver
Validating models...
0 errors found
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
[12/Sep/2012 23:26:20] "GET /interviews/ HTTP/1.1" 200 13295
[12/Sep/2012 23:26:20] "GET /static/js/plugins.js HTTP/1.1" 404 2653
[12/Sep/2012 23:26:20] "GET /static/js/jquery-1.7.1.min.js HTTP/1.1" 404 2653
[12/Sep/2012 23:26:20] "GET /static/css/style.css?v=2 HTTP/1.1" 404 2653
[12/Sep/2012 23:26:20] "GET /static/js/script.js HTTP/1.1" 404 2653
Between the two branches, settings.py and the static folder are identical so I’m not even sure where to begin with troubleshotting.
Check this. Built-in Django dev server does not work with static files if
DEBUG = False.