I am using cookiecutter-django with docker and it keeps reloading in the local env

I am starting to use cookiecutter-django 2024.07.26 with docker and after a few updates it keeps reloading

screen recorder

aqua_loui_local_django    |  * Detected change in '/usr/local/lib/python3.12/site-packages/django/contrib/sites/models.py', reloading
aqua_loui_local_django    |  * Detected change in '/usr/local/lib/python3.12/site-packages/django/contrib/sites/shortcuts.py', reloading
aqua_loui_local_django    |  * Detected change in '/usr/local/lib/python3.12/site-packages/allauth/account/views.py', reloading
aqua_loui_local_django    |  * Detected change in '/usr/local/lib/python3.12/site-packages/django/views/generic/edit.py', reloading
aqua_loui_local_django    |  * Detected change in '/usr/local/lib/python3.12/site-packages/allauth/account/mixins.py', reloading
aqua_loui_local_django    |  * Detected change in '/usr/local/lib/python3.12/site-packages/django/views/generic/base.py', reloading
aqua_loui_local_django    |  * Detected change in '/usr/local/lib/python3.12/site-packages/django/views/decorators/cache.py', reloading
aqua_loui_local_django    |  * Detected change in '/usr/local/lib/python3.12/site-packages/django/views/decorators/debug.py', reloading
aqua_loui_local_django    |  * Detected change in '/usr/local/lib/python3.12/site-packages/allauth/decorators.py', reloading
aqua_loui_local_django    |  * Restarting with watchdog (inotify)
aqua_loui_local_django    | Performing system checks...
aqua_loui_local_django    | 
aqua_loui_local_django    | System check identified no issues (0 silenced).
aqua_loui_local_django    | 
aqua_loui_local_django    | Django version 5.0.7, using settings 'config.settings.local'
aqua_loui_local_django    | Development server is running at http://0.0.0.0:8000/
aqua_loui_local_django    | Using the Werkzeug debugger (https://werkzeug.palletsprojects.com/)
aqua_loui_local_django    | Quit the server with CONTROL-C.
aqua_loui_local_django    |  * Debugger is active!

I can see you're on macOS, when did you generate your project? This was reported a couple of weeks ago and the fix was to pin watchdog to v4: https://github.com/cookiecutter/cookiecutter-django/pull/5335

The fix was to pin watchdog to v4 in local.txt:

watchdog==4.0.2 # https://github.com/gorakhargosh/watchdog

I tried to reproduce the problem in a vanilla Django project with django-extensions, just with Werkzeug or just with watchdog but didn't manage to.

Back to Top