Apply the route_prefix setting to the static assets
authorKarl O. Pinc <kop@karlpinc.com>
Fri, 4 Oct 2024 23:12:20 +0000 (18:12 -0500)
committerKarl O. Pinc <kop@karlpinc.com>
Fri, 4 Oct 2024 23:12:20 +0000 (18:12 -0500)
src/pgwui_common/pgwui_common.py

index 801326ef1e43b6b5cea0fb9c1f29ebbdbeac72ab..96a49202d567045fc34f9873081cb376e0212334 100644 (file)
@@ -67,9 +67,10 @@ def includeme(config):
     '''
     config.include('pyramid_mako')
     config.include('pyramid_beaker')
-    config.add_static_view(
-        'static/pgwui_common',
-        'pgwui_common:static/',
-        cache_max_age=3600)
+    with config.route_prefix_context(settings['pgwui'].get('route_prefix')):
+        config.add_static_view(
+            'static/pgwui_common',
+            'pgwui_common:static/',
+            cache_max_age=3600)
     establish_settings(config)
     config.scan()