PYTHON August 19, 2018

django在linux上搭建需要注意的问题

Words count 191 Reading time 1 mins. Read count 0

启动runserver时需要在命令行后添加 地址和端口号,如下:

python manage.py runserver 0.0.0.0:8000

修改settings文件,允许访问的主机参数:

ALLOWED_HOSTS = ['*']
0%