web: add options to ignore css compilation and uicache
authorSamuel Trégouët <samuel.tregouet@logilab.fr>
Thu, 16 Feb 2017 11:15:23 +0100
changeset 12010 c34590161082
parent 12009 a939b3a18d8e
child 12011 d2888fee6031
web: add options to ignore css compilation and uicache
cubicweb/web/webconfig.py
--- a/cubicweb/web/webconfig.py	Thu Feb 16 10:56:45 2017 +0100
+++ b/cubicweb/web/webconfig.py	Thu Feb 16 11:15:23 2017 +0100
@@ -92,7 +92,11 @@
           'help': 'see `cubicweb.dbapi.connect` documentation for possible value',
           'group': 'web', 'level': 2,
           }),
-
+        ('use-uicache',
+         {'type': 'yn', 'default': True,
+          'help': _('should css be compiled and store in uicache'),
+          'group': 'ui',
+          }),
         ('anonymous-user',
          {'type' : 'string',
           'default': None,
@@ -328,7 +332,7 @@
         directory = self._fs_path_locate(rid, rdirectory)
         if directory is None:
             return None, None
-        if rdirectory == 'data' and rid.endswith('.css'):
+        if self['use-uicache'] and rdirectory == 'data' and rid.endswith('.css'):
             if rid == 'cubicweb.old.css':
                 # @import('cubicweb.css') in css
                 warn('[3.20] cubicweb.old.css has been renamed back to cubicweb.css',