create-caspian-app 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.py +4 -4
- package/package.json +1 -1
package/dist/main.py
CHANGED
|
@@ -419,10 +419,10 @@ def register_single_route(url_pattern: str, file_path: str):
|
|
|
419
419
|
else:
|
|
420
420
|
content = load_template_file(file_path)
|
|
421
421
|
|
|
422
|
-
content = transform_components(content, base_dir=route_dir)
|
|
422
|
+
content = await transform_components(content, base_dir=route_dir)
|
|
423
423
|
full_context = {**kwargs, "request": request, **page_layout_props}
|
|
424
424
|
|
|
425
|
-
html_output, root_layout_id = render_with_nested_layouts(
|
|
425
|
+
html_output, root_layout_id = await render_with_nested_layouts(
|
|
426
426
|
children=content,
|
|
427
427
|
route_dir=route_dir,
|
|
428
428
|
page_metadata=page_metadata,
|
|
@@ -472,7 +472,7 @@ async def custom_404_handler(request: Request, exc: StarletteHTTPException):
|
|
|
472
472
|
if os.path.exists(not_found_path):
|
|
473
473
|
with open(not_found_path, 'r', encoding='utf-8') as f:
|
|
474
474
|
content = f.read()
|
|
475
|
-
html_output, root_layout_id = render_with_nested_layouts(
|
|
475
|
+
html_output, root_layout_id = await render_with_nested_layouts(
|
|
476
476
|
children=content,
|
|
477
477
|
route_dir='src/app',
|
|
478
478
|
page_metadata={
|
|
@@ -503,7 +503,7 @@ async def custom_general_exception_handler(request: Request, exc: Exception):
|
|
|
503
503
|
try:
|
|
504
504
|
rendered_content = string_env.from_string(
|
|
505
505
|
raw_content).render(**context_data)
|
|
506
|
-
html_output, root_layout_id = render_with_nested_layouts(
|
|
506
|
+
html_output, root_layout_id = await render_with_nested_layouts(
|
|
507
507
|
children=rendered_content,
|
|
508
508
|
route_dir='src/app',
|
|
509
509
|
page_metadata={
|