-
- postgresql
-
- pyenv virtualenv braavos
-
- create database on postgresql #PostgreSQL新手入门
- createdb braavos
-
- edit local_config.py, SQLALCHEMY_DATABASE_URI is required
- cp local_config.py.sample local_config.py
- edit local_config.py
-
- pip install -r requirements.txt # in your virtual env
-
- make hook # init git hooks
-
- make web # = make clear + make fill + make serve
-
- use Account0: test0@inad.com Password: your_default_password to login
- Account: test0 Password: your_default_password Role: Admin
- Account: test1 Password: your_default_password Role: Leader
- Account: test2 Password: your_default_password Role: Saler
- 1.Fork & Clone
- 2.git remote add upstream url git pull upstream
- 3.创建您的特性分支 (git checkout -b my-new-feature)
- 4.提交您的改动 (git commit -am 'Added some feature')
- 5.将您的修改记录提交到远程 git 仓库 (git push origin my-new-feature)
- 6.然后到 github 网站的该 git 远程仓库的 my-new-feature 分支下发起 Pull Request
make test
-
- nginx
-
- supervisor
-
- gunicorn
-
- install fabric
-
- add your id_rsa.pub to /home/inad/.ssh/authorized_keys on our server
-
- fab deploy # read the tool/fabfile.py
-
- models
- 基础
- User 用户信息(名称,邮箱,密码) Team 团队(角色,区域)
- Attachment 附件
- Comment 留言评论
-
- controllers
- user, client, medium 分别是基础信息的管理页面
- storage 投放库存信息汇总
- file 文件上传
-
- templates
- comment 评论组件
- form 表单组件
-
- forms
- controllers中用到的表单
-
- 如果新增了 model, 或者修改了model的字段
- 在 ./migrations/env.py 里面引用新 model
- python manage.py db revision --autogenerate --message "add your msg" # 生成新的版本
- python manage.py db upgrade
-
- 如果其他人修改了数据库字段
- 更新代码到最新版本
- python manage.py db upgrade