Add oob context processor to orders blueprint for full-page rendering
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 38s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 38s
The orders/index.html template extends auth/index.html which needs the oob dict for template inheritance. Without it, direct navigation to /orders/ fails with "'oob' is undefined". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,18 @@ def register(url_prefix: str) -> Blueprint:
|
||||
)
|
||||
ORDERS_PER_PAGE = 10 # keep in sync with browse page size / your preference
|
||||
|
||||
oob = {
|
||||
"extends": "_types/root/_index.html",
|
||||
"child_id": "auth-header-child",
|
||||
"header": "_types/auth/header/_header.html",
|
||||
"nav": "_types/auth/_nav.html",
|
||||
"main": "_types/auth/_main_panel.html",
|
||||
}
|
||||
|
||||
@bp.context_processor
|
||||
def inject_oob():
|
||||
return {"oob": oob}
|
||||
|
||||
@bp.before_request
|
||||
def route():
|
||||
# this is the crucial bit for the |qs filter
|
||||
|
||||
Reference in New Issue
Block a user