Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rickyxume/postgre-flask-hrms
一个基于 PostgreSQL 和 Flask 框架的人力资源管理系统 Demo
https://github.com/rickyxume/postgre-flask-hrms
Last synced: 5 days ago
JSON representation
一个基于 PostgreSQL 和 Flask 框架的人力资源管理系统 Demo
- Host: GitHub
- URL: https://github.com/rickyxume/postgre-flask-hrms
- Owner: rickyxume
- License: mit
- Created: 2021-06-27T15:21:47.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-06-27T15:27:16.000Z (over 3 years ago)
- Last Synced: 2023-09-10T15:58:12.499Z (over 1 year ago)
- Language: CSS
- Size: 406 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Postgre-Flask-HRMS
一个基于 PostgreSQL 和 Flask 框架的人力资源管理系统 Demo## 数据库迁移
````shell
flask db init
flask db migrate
flask db upgrade
flask shell
from app.models import Employee
from app import db
admin = Employee(email="[email protected]",username="Admin",password="adminpassword",is_admin=True)
db.session.add(admin)
db.session.commit()
````## 环境变量设置
在运行应用程序之前,请确保设置了FLASK_CONFIG和FLASK_APP环境变量:
```shell
set FLASK_CONFIG=development
set FLASK_APP=run.py
flask run
```> * Serving Flask app "run"
> * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)