[Django]-How to reload Django models without losing my locals in an interactive session?

1👍

You can use this snippet to rebuild the AppCache. Do not forget to remove all *.pyc files if any by using something like:

find . -name "*.pyc" -exec rm {} \;

Otherwise the reload() will ignore your changes in your models.py file.

Leave a comment