Updated factory configuration
authorThierry Florac <thierry.florac@onf.fr>
Thu, 17 Jan 2019 10:01:17 +0100
changeset 509 d157f898b1b6
parent 508 eb708d0e9298
child 510 ebb267a3c91b
Updated factory configuration
src/pyams_skin/configuration.py
--- a/src/pyams_skin/configuration.py	Wed Jan 16 23:39:45 2019 +0100
+++ b/src/pyams_skin/configuration.py	Thu Jan 17 10:01:17 2019 +0100
@@ -38,8 +38,7 @@
 # May be overriden by custom applications
 #
 
-@implementer(IConfiguration)
-@factory_config(provided=IConfiguration)
+@factory_config(IConfiguration)
 class Configuration(Persistent, Contained):
     """Manageable configuration"""
 
@@ -60,7 +59,7 @@
 @adapter_config(context=IConfigurationManager, provides=IConfiguration)
 def configuration_factory(context):
     """Configuration factory"""
-    return get_annotation_adapter(context, SKIN_CONFIGURATION_KEY, factory=IConfiguration,
+    return get_annotation_adapter(context, SKIN_CONFIGURATION_KEY, IConfiguration,
                                   name='++configuration++')
 
 
@@ -99,8 +98,7 @@
 # May be overriden by custom applications
 #
 
-@implementer(IBackOfficeConfiguration)
-@factory_config(provided=IBackOfficeConfiguration)
+@factory_config(IBackOfficeConfiguration)
 class BackOfficeConfiguration(Persistent, Contained):
     """Back-office manageable configuration"""
 
@@ -124,7 +122,7 @@
 @adapter_config(context=IConfigurationManager, provides=IBackOfficeConfiguration)
 def back_office_configuration_factory(context):
     """Back-office configuration factory"""
-    return get_annotation_adapter(context, SKIN_BACK_CONFIGURATION_KEY, factory=IBackOfficeConfiguration,
+    return get_annotation_adapter(context, SKIN_BACK_CONFIGURATION_KEY, IBackOfficeConfiguration,
                                   name='++back-configuration++')