create-caspian-app 0.0.8 → 0.0.9
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 +3 -3
- package/package.json +1 -1
package/dist/main.py
CHANGED
|
@@ -26,7 +26,7 @@ from casp.auth import (
|
|
|
26
26
|
configure_auth,
|
|
27
27
|
)
|
|
28
28
|
from casp.rpc import register_rpc_routes
|
|
29
|
-
from casp.layout import render_with_nested_layouts, string_env,
|
|
29
|
+
from casp.layout import render_with_nested_layouts, string_env, load_template_file, render_page
|
|
30
30
|
import hashlib
|
|
31
31
|
|
|
32
32
|
load_dotenv()
|
|
@@ -309,7 +309,7 @@ def load_route_module(file_path: str):
|
|
|
309
309
|
|
|
310
310
|
module = importlib.util.module_from_spec(spec)
|
|
311
311
|
spec.loader.exec_module(module)
|
|
312
|
-
setattr(module, '
|
|
312
|
+
setattr(module, 'render_page', render_page)
|
|
313
313
|
return module
|
|
314
314
|
|
|
315
315
|
|
|
@@ -383,7 +383,7 @@ def register_single_route(url_pattern: str, file_path: str):
|
|
|
383
383
|
else:
|
|
384
384
|
content = str(result)
|
|
385
385
|
else:
|
|
386
|
-
content =
|
|
386
|
+
content = load_template_file(file_path)
|
|
387
387
|
|
|
388
388
|
# Transform components
|
|
389
389
|
content = transform_components(content, base_dir=route_dir)
|