# StupidMart
暑期实训作业,超市订单管理系统,视频演示地址 [百度云](https://pan.baidu.com/play/video#/video?path=%2FDemo%2FStupidMart-Demo.mp4&t=-1)
README 文档是用 [cookiecutter-flask](https://github.com/sloria/cookiecutter-flask) 模板改的,懒得重新写了,所以就没改成中文
## Quickstart
First, set your app's secret key as an environment variable. For example, add the following to `.bashrc` or `.bash_profile`.
``` {.sourceCode .bash}
export STUPIDMART_SECRET='something-really-secret'
```
Run the following commands to bootstrap your environment :
git clone https://github.com/Zhiwei1996/StupidMart
cd StupidMart
pip install -r requirements/dev.txt
In general, before running shell commands, set the `FLASK_APP` and `FLASK_DEBUG` environment variables :
export FLASK_APP=/path/to/autoapp.py
export FLASK_DEBUG=1
Configure your sqlalchemy url in `settings.py` and create you database named `stupidmart`
```bash
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://user:password@host/stupidmart'
```
Once you have installed your DBMS, run the following to create your app's database tables and perform the initial migration :
flask db init
flask db migrate
flask db upgrade
flask run deploy
## Deployment
To deploy:
export FLASK_DEBUG=0 # With setting to 1 you can use DebugToolbar
flask run # start the flask server
In your production environment, make sure the `FLASK_DEBUG` environment variable is unset or is set to `0`, so that `ProdConfig` is used.
## Shell
To open the interactive shell, run :
flask shell
By default, you will have access to the flask `app`.
## Running Tests
To run all tests, run :
flask test # Write your own test codes, and then use this command to test
## Migrations
Whenever a database migration needs to be made. Run the following commands :
flask db migrate
This will generate a new migration script. Then run :
flask db upgrade
To apply the migration.
For a full migration command reference, run `flask db --help`.
## Asset Management
Files placed inside the `assets` directory and its subdirectories (excluding `js` and `css`) will be copied by webpack's `file-loader` into the `static/build` directory, with hashes of their contents appended to their names. For instance, if you have the file `assets/img/favicon.ico`, this will get copied into something like `static/build/img/favicon.fec40b1d14528bf9179da3b6b78079ad.ico`. You can then put this line into your header:
<link rel="shortcut icon" href="{{asset_url_for('img/favicon.ico') }}">
to refer to it inside your HTML page. If all of your static files are managed this way, then their filenames will change whenever their contents do, and you can ask Flask to tell web browsers that they should cache all your assets forever by including the following line in your `settings.py`:
SEND_FILE_MAX_AGE_DEFAULT = 31556926 # one year
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
管理系统是一种通过计算机技术实现的用于组织、监控和控制各种活动的软件系统。这些系统通常被设计用来提高效率、减少错误、加强安全性,同时提供数据和信息支持。以下是一些常见类型的管理系统: 学校管理系统: 用于学校或教育机构的学生信息、教职员工信息、课程管理、成绩记录、考勤管理等。学校管理系统帮助提高学校的组织效率和信息管理水平。 人力资源管理系统(HRM): 用于处理组织内的人事信息,包括员工招聘、培训记录、薪资管理、绩效评估等。HRM系统有助于企业更有效地管理人力资源,提高员工的工作效率和满意度。 库存管理系统: 用于追踪和管理商品或原材料的库存。这种系统可以帮助企业避免库存过剩或不足的问题,提高供应链的效率。 客户关系管理系统(CRM): 用于管理与客户之间的关系,包括客户信息、沟通记录、销售机会跟踪等。CRM系统有助于企业更好地理解客户需求,提高客户满意度和保留率。 医院管理系统: 用于管理医院或医疗机构的患者信息、医生排班、药品库存等。这种系统可以提高医疗服务的质量和效率。 财务管理系统: 用于记录和管理组织的财务信息,包括会计凭证、财务报表、预算管理等。财务管理系统
资源推荐
资源详情
资源评论
收起资源包目录
2018 暑期实训大作业,超市订单管理系统,重新熟悉了下 flask 开发,We Love Cookiecutter .zip (88个子文件)
SJT-code
.travis.yml 408B
Pipfile 608B
migrations
README 38B
script.py.mako 494B
alembic.ini 770B
env.py 3KB
versions
25e963323057_.py 4KB
LICENSE 1KB
requirements
dev.txt 332B
prod.txt 465B
tests
__init__.py 25B
test_functional.py 4KB
factories.py 767B
test_forms.py 2KB
test_config.py 524B
test_models.py 2KB
conftest.py 930B
.isort.cfg 27B
package.json 2KB
autoapp.py 321B
StupidMart
utils.py 63B
__init__.py 32B
extensions.py 615B
commands.py 5KB
app.py 2KB
admin
__init__.py 75B
models.py 6KB
views.py 8KB
forms.py 46B
webpack
.gitkeep 0B
database.py 2KB
templates
users
providerList.html 13KB
billList.html 14KB
change_password.html 3KB
403.html 13B
admin
userAdd.html 6KB
userList.html 15KB
public
public.html 2KB
login.html 1KB
index.html 2KB
about.html 16B
404.html 14B
401.html 15B
user
__init__.py 75B
models.py 2KB
views.py 13KB
forms.py 24B
public
__init__.py 115B
views.py 2KB
forms.py 44B
decorators.py 564B
compat.py 401B
settings.py 2KB
static
assets
js
js.js 1KB
main.js 282B
time.js 1KB
jquery.js 267KB
plugins.js 86B
script.js 37B
img
yh.png 5KB
buy.png 2KB
clock.jpg 22KB
time.png 1KB
tc.png 2KB
login_bg.jpg 45KB
xiugai.png 4KB
home.png 4KB
tianjia.png 4KB
search.png 4KB
.gitkeep 0B
mm.png 3KB
login_img.png 9KB
read.png 1KB
schu.png 4KB
loginBg.jpg 18KB
formBg.png 41KB
gys.png 5KB
leftBg.png 3KB
zd.png 2KB
css
style.css 8KB
public.css 6KB
Procfile 66B
requirements.txt 152B
Pipfile.lock 22KB
.gitignore 511B
setup.cfg 43B
README.md 3KB
db.sql 5KB
共 88 条
- 1
资源评论
JJJ69
- 粉丝: 6223
- 资源: 5780
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功