-
Notifications
You must be signed in to change notification settings - Fork 0
/
view.py
43 lines (23 loc) · 1.4 KB
/
view.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
from fastapi import Request
from typing import List
from fastapi.templating import Jinja2Templates
import schemas
templates = Jinja2Templates(directory="app3/templates")
def signin(request: Request):
return templates.TemplateResponse("signin.html", {"request": request})
def signup(request: Request):
return templates.TemplateResponse("signup.html", {"request": request})
def select_taste(request: Request):
return templates.TemplateResponse("preference.html", {"request": request})
def select_style(request: Request):
return templates.TemplateResponse("style.html", {"request": request})
def animation(request: Request, login_check: bool):
return templates.TemplateResponse("intro.html", {"request": request, "login_check": login_check})
def main(request: Request):
return templates.TemplateResponse("zshop/index.html", {"request": request})
def products(request: Request, products: schemas.ShowProduct, pg: int):
return templates.TemplateResponse("zshop/shop.html", {"request": request, "products": products, "page": pg})
def about_product(request: Request, product: schemas.ShowProduct):
return templates.TemplateResponse("zshop/shop-single.html", {"request": request, "product": product})
def reviews(request: Request, reviews: schemas.ShowReview, pg: int):
return templates.TemplateResponse("zshop/shop-single.html", {"request": request, "reviews": reviews, "page": pg})