Django dev server does not start if noreload is not set

62 Views Asked by At

I'm encountering an issue when attempting to start the Django development server with runserver_plus from django-extensions

When I initiate it with the following command:

python backoffice/manage.py runserver_plus 0.0.0.0:8000 --noreload

It starts successfully without any problems. However, if I use the following command instead

python backoffice/manage.py runserver_plus 0.0.0.0:8000

Notice that if I not pass the --noreload flag, it returns the following error:

WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:8000
 * Running on http://192.168.0.16:8000
Press CTRL+C to quit
 * Restarting with stat
/usr/local/Cellar/[email protected]/3.11.2_1/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python: can't open file '/Users/user/dev/backoffice/manage.py': [Errno 2] No such file or directory

The command is being executed in the same place so it does not make sense why is not finding the manage file.

Why does it only work when I include --noreload? Is there a way to make it work? I would like to use the reload capability to save time in development process.

Versions:

python 3.11
Django 4.1.9
django-extensions 3.2.1

Thank you!

0

There are 0 best solutions below