--- a/cubicweb/pyramid/__init__.py Thu Apr 27 10:16:39 2017 +0200
+++ b/cubicweb/pyramid/__init__.py Tue Jun 06 12:20:17 2017 +0200
@@ -22,6 +22,7 @@
import atexit
import os
+import warnings
import wsgicors
@@ -240,5 +241,11 @@
config.include('cubicweb.pyramid.core')
- if asbool(config.registry.settings.get('cubicweb.bwcompat', True)):
- config.include('cubicweb.pyramid.bwcompat')
+ if asbool(config.registry.settings.get('cubicweb.bwcompat',
+ cwconfig.name == 'all-in-one')):
+ if cwconfig.name != 'all-in-one':
+ warnings.warn('"cubicweb.bwcompat" setting only applies to '
+ '"all-in-one" instance configuration',
+ UserWarning)
+ else:
+ config.include('cubicweb.pyramid.bwcompat')