Skip to content

A flask shop, which has vendor and user, vendor can publish product and user can buy product. flask的商店,包含卖家和买家

Notifications You must be signed in to change notification settings

philopatrick/fancy_shop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to start the app

  1. Create a virtual environment:

virtualenv fancy_shop

if there is no virtualenv, install with:

pip install -U virtualenv

  1. Install the requirements

in the terminal, open into the virtualenv folder, then copy the webapp into that folder:

cd fancy_shop
cp -r where/webapp .
cp requirements.txt .

and then, install the requirement with: pip install -r requirements.txt

  1. Config the database

run the code to initiate database

cd webapp
python3 app.py

find the generated test.sqlite file, and replace the file with the root folder file

copy test.sqlite database into that folder:

cp webapp/test.sqlite var/app-instance

  1. Run the app

open into webapp, and run with python3 app.py

cd webapp
python3 app.py

how the folder organize

models.py hold the database model define app.py hold most backend api route static/ hold the static file, css, js, image, and user upload files templates/ hold the jinjia2 template html files views.py hold most view route

We seperate the flask route with flask blueprint into views and apis.

About

A flask shop, which has vendor and user, vendor can publish product and user can buy product. flask的商店,包含卖家和买家

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published