1.post用户名和密码登录
http://127.0.0.1:8000/login/
{"username":"admin", "password":"admin123"}
2.settings.pyについて
run manage.py task..的时候出错。
ERRORS:
?: (staticfiles.E002) The STATICFILES_DIRS setting should not contain the STATIC_ROOT setting.
错误原因有可能是在settings中静态文件目录设置的有问题
修改:
STATIC_ROOT=os.path.join(BASE_DIR,"static/")#错误
STATIC_ROOT=os.path.join(BASE_DIR,"/static/")#正确
网友评论