第三方支付和登录的回调url指向服务器ip地址。为了方便调试,希望能够完成通过pycharm调试远端服务器
上传代码到服务器
tools=>deployment=>configration=>add 同步代码
msql数据库
采用以下设置的test用户无法登录localhost,如需localhost只需把%改为localhost重新操作一遍即可
grant all privileges on *.* to 'test'@'%' identified by '123456'; flush privileges;
代码
修改后记得随时上传代码
setting中这个选项如果为空会导致无法外部登录。
ALLOWED_HOSTS = ["*"]
pycharm->setting中添加远程解释器。同步需要时间。
run->edit configuration->debug->0.0.0.0:8001(线上运行端口,8000已经有网站了)
网友评论