Spaces:
Sleeping
Sleeping
Update app/main.py
Browse files- app/main.py +4 -11
app/main.py
CHANGED
|
@@ -90,23 +90,16 @@ app.mount("/static", StaticFiles(directory="app/static"), name="static")
|
|
| 90 |
templates = Jinja2Templates(directory="app/templates")
|
| 91 |
|
| 92 |
|
| 93 |
-
templates.env.cache = {}
|
| 94 |
-
templates.env.auto_reload = True
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
logger.info(f"[DEBUG] Jinja env: {type(templates.env)}")
|
| 98 |
-
logger.info(f"[DEBUG] cache type: {type(templates.env.cache)}")
|
| 99 |
-
|
| 100 |
-
|
| 101 |
app.include_router(router)
|
| 102 |
|
| 103 |
|
| 104 |
@app.get("/", response_class=HTMLResponse)
|
| 105 |
async def index(request: Request):
|
|
|
|
| 106 |
return templates.TemplateResponse(
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
"max_upload_mb": settings.max_upload_size_mb,
|
| 111 |
"allowed_formats": ", ".join(settings.allowed_extensions),
|
| 112 |
},
|
|
|
|
| 90 |
templates = Jinja2Templates(directory="app/templates")
|
| 91 |
|
| 92 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
app.include_router(router)
|
| 94 |
|
| 95 |
|
| 96 |
@app.get("/", response_class=HTMLResponse)
|
| 97 |
async def index(request: Request):
|
| 98 |
+
|
| 99 |
return templates.TemplateResponse(
|
| 100 |
+
request=request,
|
| 101 |
+
name="index.html",
|
| 102 |
+
context={
|
| 103 |
"max_upload_mb": settings.max_upload_size_mb,
|
| 104 |
"allowed_formats": ", ".join(settings.allowed_extensions),
|
| 105 |
},
|