- Added views for webshop admin interface using FastAPI and Jinja2 templates. - Created initial SQL migration for webshop configurations, products, orders, and order items. - Defined module metadata in module.json for webshop. - Implemented HTML template for the webshop index page. - Documented frontend requirements and API contracts in WEBSHOP_FRONTEND_PROMPT.md. - Introduced scripts for generating conversation summaries and testing Whisper capabilities.
24 lines
678 B
Python
24 lines
678 B
Python
"""
|
|
Webshop Module - Views Router
|
|
HTML page serving for webshop admin interface
|
|
"""
|
|
|
|
from fastapi import APIRouter, Request
|
|
from fastapi.responses import HTMLResponse
|
|
from fastapi.templating import Jinja2Templates
|
|
import os
|
|
|
|
# Router for HTML views
|
|
router = APIRouter()
|
|
|
|
# Template directory - must be root "app" to allow extending shared/frontend/base.html
|
|
templates = Jinja2Templates(directory="app")
|
|
|
|
|
|
@router.get("/webshop", response_class=HTMLResponse, include_in_schema=False)
|
|
async def webshop_admin(request: Request):
|
|
"""
|
|
Webshop administration interface
|
|
"""
|
|
return templates.TemplateResponse("modules/webshop/frontend/index.html", {"request": request})
|