my personal blog which power by python3,django1.10,pinax and zinnia
http://williezh.pythonanywhere.com
Python: 3.5
Django:1.10
MySQL:5.1.73
- 克隆项目:
git clone git@github.com:williezh/williezh_blog
- 进入文件夹:
cd williezh_blog
- 建立虚拟环境:
virtualenv --python=python3.5 venv
- 激活虚拟环境:
source venv/bin/activate
- 安装必需包(首次运行):
pip install -r requirements.txt
- 由local_settings_sample.py创建local_settings.py
cp williezh_blog/local_settings_sample.py williezh_blog/local_settings.py
- 修改其中的数据库配置('USER','PASSWORD','HOST')
vi williezh_blog/local_settings.py
- 初始化数据库(首次运行):
python createdatabase.py
python manage.py migrate
python manage.py loaddata mysql_data.json
python manage.py createsuperuser
- 运行服务:
python manage.py runserver
- 打开如下网址即可看到运行效果:
- 进入管理员模式可发表博客: