-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
79 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,94 @@ | ||
## Create virtualenv | ||
``` | ||
python3 -m venv myvenv | ||
source myvenv/bin/activate | ||
``` | ||
|
||
- python3 -m venv myvenv | ||
- source myvenv/bin/activate | ||
|
||
## Install Dependencies | ||
```pip3 install -r requirements.txt``` | ||
|
||
- pip3 install -r requirements.txt | ||
|
||
## Setup Database | ||
``` | ||
export FLASK_APP=app | ||
flask shell | ||
|
||
// Import Database object | ||
- export FLASK_APP=app | ||
|
||
- flask shell | ||
|
||
## Import Database object | ||
|
||
- from app import db | ||
|
||
from app import db | ||
## Import models | ||
|
||
// Import models | ||
from model.user import User | ||
- from models import User | ||
|
||
// Create tables | ||
db.create_all() | ||
## Create tables | ||
|
||
// Verify User table got created | ||
User.query.all() // returns [] | ||
``` | ||
- db.create_all() | ||
- User.query.all() // returns []``` | ||
|
||
## Run App | ||
``` | ||
python3 app.py | ||
|
||
To run in development mode: flask run --reload | ||
``` | ||
- python3 app.py | ||
|
||
## Run Selenium Tests: | ||
|
||
- pytest -v | ||
|
||
## To run in development mode: | ||
|
||
- flask run --reload | ||
|
||
## On user registration, run the following commands to get the otp | ||
|
||
- flask shell | ||
|
||
- from models import User | ||
|
||
- User.query.all()[-1].otp | ||
|
||
|
||
## Setup DB Migration | ||
``` | ||
flask db init | ||
flask db migrate -m "Initial Migration" | ||
flask db upgrade | ||
``` | ||
|
||
- flask db init | ||
|
||
- flask db migrate -m "Initial Migration" | ||
|
||
- flask db upgrade | ||
|
||
## Web App Screenshots | ||
|
||
# Login | ||
|
||
![Login](./screenshots/login.png) | ||
|
||
# Register | ||
|
||
![Register](./screenshots/register.png) | ||
|
||
# Enter OTP | ||
|
||
![Enter OTP](./screenshots/enter_otp.png) | ||
|
||
# Email Confirmed | ||
|
||
![Email Confirmed](./screenshots/email_confirmed.png) | ||
|
||
# Products Dashboard | ||
|
||
![Products Dashboard](./screenshots/all_products.png) | ||
|
||
# Filter Products View By Categories | ||
|
||
![Filter Categories](./screenshots/filter_view_by_categories.png) | ||
|
||
# Search Products | ||
|
||
![Search Products](./screenshots/search_products.png) | ||
|
||
# View Cart Items | ||
|
||
![View Cart](./screenshots/view_cart.png) | ||
|
||
# Checkout | ||
|
||
![Checkout](./screenshots/checkout.png) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.