2
votes

I've written an app and have been testing it within a project. Any change I make to the project is reflected immediately. But when I make a change to the app and run the install script again, none of the changes are shown. I even look at the files in the site-packages directory and see that the change has been installed.

I've tried clearing the browser cache, restarting the browser, trying a different browser, shutting down and restarting the django server, re-sourcing the virtual environment, setting $PYTHON_PATH, and even restarted my system to no avail.

This has happened just recently, within the past hour. I was able to make django reflect the changes when I set $PYTHON_PATH and, afterword, re-sourcing the virtual env. But now that won't work, either.

I keep thinking it's a caching issue, but I'm not seeing anything on the django cache that would cause this problem.

I'm using lighttpd as the server backend if that's an issue.

1
Are you making static file changes? (js, css, etc.) you may need to run collectstaticjproffitt
No, these are changes made to python files.i41
@SrinivasReddyThatiparthy It's a lot of code.i41
did you try to delete all pyc files?Leonardo.Z
Deleting all pyc files worked once. Now that no pyc files are left it's gone back to using the old code (meaning that Django keeps rendering the code that I wrote just after deleting pyc files).i41

1 Answers

4
votes

If your using google chrome:

  1. Open your site to the page where the changes are not reflecting.
  2. press f12 to open inspect window, the developer tool in chrome.
  3. Now left click on the reload button for a longer duration continuously, about one second long.
  4. You will get three options Go for empty cache and hard reload in this case.

Done!