/williezh_blog

myblog which power by python3,django1.10,pinax and zinnia

Primary LanguageJavaScriptMIT LicenseMIT

williezh_blog


my personal blog which power by python3,django1.10,pinax and zinnia


Demo:

http://williezh.pythonanywhere.com

Base on

Python: 3.5

Django:1.10

MySQL:5.1.73

Run at local:

  1. 克隆项目:
git clone git@github.com:williezh/williezh_blog
  1. 进入文件夹:
cd williezh_blog
  1. 建立虚拟环境:
virtualenv --python=python3.5 venv
  1. 激活虚拟环境:
source venv/bin/activate
  1. 安装必需包(首次运行):
pip install -r requirements.txt
  1. 由local_settings_sample.py创建local_settings.py
cp williezh_blog/local_settings_sample.py williezh_blog/local_settings.py
  1. 修改其中的数据库配置('USER','PASSWORD','HOST')
vi williezh_blog/local_settings.py
  1. 初始化数据库(首次运行):
python createdatabase.py
python manage.py migrate
python manage.py loaddata mysql_data.json
python manage.py createsuperuser
  1. 运行服务:
python manage.py runserver
  1. 打开如下网址即可看到运行效果:

http://127.0.0.1:8000/

  1. 进入管理员模式可发表博客:

http://127.0.0.1:8000/admin