mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-27 10:44:33 +00:00
Print debug message about static directories served
This commit is contained in:
parent
71b27be720
commit
4637bba3eb
@ -90,11 +90,14 @@ def setup_server():
|
|||||||
application = django.core.wsgi.get_wsgi_application()
|
application = django.core.wsgi.get_wsgi_application()
|
||||||
cherrypy.tree.graft(application, cfg.server_dir)
|
cherrypy.tree.graft(application, cfg.server_dir)
|
||||||
|
|
||||||
|
static_dir = os.path.join(cfg.file_root, 'static')
|
||||||
config = {
|
config = {
|
||||||
'/': {'tools.staticdir.root': os.path.join(cfg.file_root, 'static'),
|
'/': {'tools.staticdir.root': static_dir,
|
||||||
'tools.staticdir.on': True,
|
'tools.staticdir.on': True,
|
||||||
'tools.staticdir.dir': '.'}}
|
'tools.staticdir.dir': '.'}}
|
||||||
cherrypy.tree.mount(None, django.conf.settings.STATIC_URL, config)
|
cherrypy.tree.mount(None, django.conf.settings.STATIC_URL, config)
|
||||||
|
LOGGER.debug('Serving static directory %s on %s', static_dir,
|
||||||
|
django.conf.settings.STATIC_URL)
|
||||||
|
|
||||||
for module_import_path in module_loader.loaded_modules:
|
for module_import_path in module_loader.loaded_modules:
|
||||||
module = importlib.import_module(module_import_path)
|
module = importlib.import_module(module_import_path)
|
||||||
@ -110,6 +113,8 @@ def setup_server():
|
|||||||
'tools.staticdir.dir': '.'}}
|
'tools.staticdir.dir': '.'}}
|
||||||
urlprefix = "%s%s" % (django.conf.settings.STATIC_URL, module_name)
|
urlprefix = "%s%s" % (django.conf.settings.STATIC_URL, module_name)
|
||||||
cherrypy.tree.mount(None, urlprefix, config)
|
cherrypy.tree.mount(None, urlprefix, config)
|
||||||
|
LOGGER.debug('Serving static directory %s on %s', static_dir,
|
||||||
|
urlprefix)
|
||||||
|
|
||||||
if not cfg.no_daemon:
|
if not cfg.no_daemon:
|
||||||
Daemonizer(cherrypy.engine).subscribe()
|
Daemonizer(cherrypy.engine).subscribe()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user