2017-05-29T10:58:45
Reload module via Django Shell (Python 3)
I just started my first Django project with Python 3 in earnest. One of the first things I have noticed is that reload
isn't available by default from the Django shell. It needs to be imported:
>>> from importlib import reload
>>> reload(<module>)
This became a pretty tedious process and didn't always reload the module as expected. So, instead of reloading the shell and the module to run a command, I moved the commands that I was running into a custom Django management command. No more reloading =)