如何在FreeBSD Raspberry上的virtualenv中修复Django不断重新加载

问题描述 投票:2回答:1

我在带有Python3.6和virtualenv的Raspberry PI 3+上安装了一个新的FreeBSD安装。

在virtualenv'web'中我创建了Django项目'prod'和uWSGI。

我可以毫无问题地启动一个uWSGI服务器实例。但如果我试着跑

python manage.py runserver 0.0.0.0:8000

Django不断重新加载服务器,因为它检测到python文件的更改:

December 07, 2018 - 15:00:59
Django version 2.2, using settings 'prod.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.
/usr/local/lib/python3.6/gettext.py changed, reloading.
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).

December 07, 2018 - 15:01:05
Django version 2.2, using settings 'prod.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.
/usr/local/lib/python3.6/uuid.py changed, reloading.
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).

对于'/usr/local/lib/python3.6/'中的每个文件都会发生这种情况

我在VirtualBox上有相同的设置(不是100%相同,VirtualBox是FreeBSD的amd64版本)

如果我跑:

python manage.py runserver 0.0.0.0:8000 --noreload

服务器可以访问并且稳定

我格式化了SD卡并重新启动了Project,结果相同。

我对文件的唯一更改:

ALLOWED_HOSTS = ['X.X.X.X']

其中X.X.X.X是外部IP

django python-3.x raspberry-pi freebsd
1个回答
0
投票

同样的问题在这里从Django 2.2降级到Django 2.1.7为我修复了它。

© www.soinside.com 2019 - 2024. All rights reserved.