[Kimchi-devel] [PATCH] [Kimchi] Bug fix: Let Wok specify UI configuration on cherrypy settings
Daniel Henrique Barboza
dhbarboza82 at gmail.com
Tue Apr 4 18:49:58 UTC 2017
Reviewed-by: Daniel Barboza <danielhb at linux.vnet.ibm.com>
On 04/03/2017 07:59 PM, Aline Manera wrote:
> Signed-off-by: Aline Manera <alinefm at linux.vnet.ibm.com>
> ---
> config.py.in | 14 +-------------
> tests/test_config.py.in | 1 +
> 2 files changed, 2 insertions(+), 13 deletions(-)
> ---
>
> Depends on Wok patch:
> - [PATCH] [Wok] Bug fix #1109: Specify Content-Type for SVG files
>
> ---
>
> diff --git a/config.py.in b/config.py.in
> index a887670..de7024e 100644
> --- a/config.py.in
> +++ b/config.py.in
> @@ -24,7 +24,7 @@ import platform
> import threading
> from cherrypy.lib.reprconf import Parser
>
> -from wok.config import CACHEEXPIRES, PluginConfig, PluginPaths
> +from wok.config import PluginConfig, PluginPaths
> from wok.xmlutils.utils import xpath_get_text
>
> kimchiLock = threading.Lock()
> @@ -172,16 +172,4 @@ class KimchiConfig(PluginConfig):
> custom_config[uri].update({'tools.staticfile.on': True,
> 'tools.staticfile.filename': path})
>
> - for dirname in ('css', 'js', 'images'):
> - custom_config['/' + dirname] = {
> - 'tools.staticdir.on': True,
> - 'tools.staticdir.dir': os.path.join(kimchiPaths.ui_dir,
> - dirname),
> - 'tools.wokauth.on': False,
> - 'tools.nocache.on': False}
> - if dirname != 'images':
> - custom_config['/' + dirname].update({
> - 'tools.expires.on': True,
> - 'tools.expires.secs': CACHEEXPIRES})
> -
> self.update(custom_config)
> diff --git a/tests/test_config.py.in b/tests/test_config.py.in
> index 74ea84a..d8110ea 100644
> --- a/tests/test_config.py.in
> +++ b/tests/test_config.py.in
> @@ -144,6 +144,7 @@ class ConfigTests(unittest.TestCase):
> 'tools.wokauth.on': False,
> 'tools.nocache.on': False,
> 'tools.staticdir.dir': '%s/ui/images' % pluginPrefix,
> + 'tools.staticdir.content_types': {'svg': 'image/svg+xml'},
> 'tools.staticdir.on': True
> },
> '/data/screenshots': {
More information about the Kimchi-devel
mailing list