pythonanywhere 部署 webpy

======================= start =====================
1、 在pythonanywhere中Add a new web app。
2、 新开一个Bash ,创建文件夹。最好是使用mkvirtualenv 虚拟环境
3、 在Files管理页面上传web文件包。
4、 在Bash里解压。
5、 修改WSGI configuration file:
仔细阅读注释部分。我的网站

import sys

:个人路径
path = '/home/

:application在index.py中
from index import application

6、在Web管理页面的Static files:管理中新建 静态文件 url 路径
如: /static /home/

7、Reload站点。

======================= end =====================

猜你喜欢

转载自www.cnblogs.com/daivlin/p/9818438.html