宝塔部署django的坑

1、配置文件并没有写入:

wsgi-file = /www/wwwroot/websit/websit/wsgi.py  #导致 Internal Server Error

2、admin样式丢失

#settings.py添加
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)
#运行 python manage.py collectstatic

猜你喜欢

转载自www.cnblogs.com/jssoft/p/11460393.html