How to reload modules in django shell?

后端 未结 11 1206
面向向阳花
面向向阳花 2020-12-22 18:38

I am working with Django and use Django shell all the time. The annoying part is that while the Django server reloads on code changes, the shell does not, so every time I ma

11条回答
  •  无人及你
    2020-12-22 18:58

    My solution to it is I write the code and save to a file and then use:

    python manage.py shell < test.py

    So I can make the change, save and run that command again till I fix whatever I'm trying to fix.

提交回复
热议问题