about summary refs log tree commit diff
path: root/uploader/sui.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-12-16 13:57:43 -0600
committerFrederick Muriuki Muriithi2025-12-16 13:57:43 -0600
commit6697dd9757a2b28f2ea29888128d829393f66e93 (patch)
tree9f7fc75913ac9092537d93c6a39227b7974ac313 /uploader/sui.py
parent98993dc0be542b377e62c97031f29f63e83f7ed4 (diff)
downloadgn-uploader-6697dd9757a2b28f2ea29888128d829393f66e93.tar.gz
Move logic for loading streamlined-UI templates to reusable function
Diffstat (limited to 'uploader/sui.py')
-rw-r--r--uploader/sui.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/uploader/sui.py b/uploader/sui.py
new file mode 100644
index 0000000..8eb863d
--- /dev/null
+++ b/uploader/sui.py
@@ -0,0 +1,8 @@
+"""Utilities for streamlined UI. This is a temporary module."""
+from flask import request
+
+def sui_template(template_path: str) -> str:
+    """Return the streamlined UI template for given template path."""
+    _sui="sui-" if request.args.get("streamlined_ui") else ""
+    _parts = template_path.split("/")
+    return "/".join(_parts[:-1] + [f"{_sui}{_parts[-1]}"])