mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-03-11 09:04:54 +00:00
Serve /usr/share/javscript on /javascript
Since the links to javascript libraries have been removed in favor of using javscript-common, it is no longer possible to run Plinth stand alone without a reverse proxy that also serves /javscript. This patch fixes that. Now /javascirpt is also available when Plinth is running stand alone.
This commit is contained in:
parent
2b85416aa2
commit
3fcbb36a21
@ -109,6 +109,15 @@ def setup_server():
|
||||
LOGGER.debug('Serving static directory %s on %s', static_dir,
|
||||
django.conf.settings.STATIC_URL)
|
||||
|
||||
js_dir = '/usr/share/javascript'
|
||||
js_url = '/javascript'
|
||||
config = {
|
||||
'/': {'tools.staticdir.root': js_dir,
|
||||
'tools.staticdir.on': True,
|
||||
'tools.staticdir.dir': '.'}}
|
||||
cherrypy.tree.mount(None, js_url, config)
|
||||
LOGGER.debug('Serving javascript directory %s on %s', js_dir, js_url)
|
||||
|
||||
for module_import_path in module_loader.loaded_modules:
|
||||
module = importlib.import_module(module_import_path)
|
||||
module_name = module_import_path.split('.')[-1]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user