Sorry, I'm newbie on python. I change code in .py file but no changes happens. Guess, script code is cahced in memory.
What should I do to make my changes working?
PS: tried to delete complied .pyc file, no luck 8-( guess, IO need to try to restart uwsgi/nginx?
Older versions of django
find . -name "*.pyc" -exec rm -rf {} \;
New version of django has this:
python manage.py clean_pyc
If you simply want to restart the webserver it depends on the configuration you are using:
via gunicorn:
use --reload option
via django inbuilt runserver: since version 1.7 it automatically does that.
Just touch the WSGI file: touch wsgi.py and your project should refresh.
Please have a look at this similar request: How to reload new update in Django project with Apache, mod_wsgi?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With