1.django 默认的runserver使用的是http协议,如果需要https协议,需要以下3个库
pip install django-extensions
pip install django-werkzeug-debugger-runserver
pip install pyOpenSSL
2.配置settings文件 在INSTALLED_APPS下添加
‘werkzeug_debugger_runserver’,
‘django_extensions’,
3. 在终端使用命令运行
python manage.py runserver_plus --cert server.crt 0.0.0.0:8000