https://github.com/zhangjingqiang/qiang-tools
https://github.com/zhangjingqiang/qiang-tools
flask python
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/zhangjingqiang/qiang-tools
- Owner: zhangjingqiang
- Created: 2016-04-10T04:20:14.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-04-11T13:50:58.000Z (about 10 years ago)
- Last Synced: 2025-02-28T12:04:16.146Z (over 1 year ago)
- Topics: flask, python
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Qiang Tools
A tools application by flask.
## Deploy to Local
### Set env config under .env file
### Run migration by alembic
```
python manage.py db init
python manage.py db migrate
python manage.py db upgrade
```
### Create user
```
python manage.py shell
>>> from app import db
>>> from models import User
>>> db.session.add(User('admin', '12345'))
>>> db.session.commit()
>>> exit()
```
---
## Deploy to Heroku
```
heroku git:remote -a [YOUR_HEROKU_APP]
heroku config:set APP_SETTINGS=config.ProductionConfig --remote heroku
heroku addons:create heroku-postgresql:hobby-dev
heroku config
git push heroku master
heroku run python manage.py db upgrade
heroku run python manage.py shell
(Create user)
```
---
## License
MIT