Renamed factories to use snake_case on functions
authorThierry Florac <thierry.florac@onf.fr>
Wed, 28 Mar 2018 16:02:00 +0200
changeset 73 22f4640630ba
parent 72 f548e85028b0
child 74 46260820b73f
Renamed factories to use snake_case on functions
src/pyams_portal/page.py
src/pyams_portal/portlet.py
src/pyams_portal/template.py
--- a/src/pyams_portal/page.py	Wed Mar 28 15:34:15 2018 +0200
+++ b/src/pyams_portal/page.py	Wed Mar 28 16:02:00 2018 +0200
@@ -129,7 +129,7 @@
 
 
 @adapter_config(context=IPortalContext, provides=IPortalPage)
-def PortalContextPageAdapter(context):
+def portal_context_page_adapter(context):
     """Portal context page factory"""
     annotations = IAnnotations(context)
     page = annotations.get(PORTAL_PAGE_KEY)
@@ -149,14 +149,14 @@
 
 
 @adapter_config(context=IPortalContext, provides=IPortalTemplateConfiguration)
-def PortalContextTemplateConfigurationAdapter(context):
+def portal_context_template_configuration_adapter(context):
     """Portal context template configuration adapter"""
     template = IPortalPage(context).template
     return IPortalTemplateConfiguration(template)
 
 
 @adapter_config(context=IPortalContext, provides=IPortalPortletsConfiguration)
-def PortalContextPortletsConfigurationAdapter(context):
+def portal_context_portlets_configuration_adapter(context):
     """Portal context portlets configuration adapter"""
     # get page and template
     page = IPortalPage(context)
--- a/src/pyams_portal/portlet.py	Wed Mar 28 15:34:15 2018 +0200
+++ b/src/pyams_portal/portlet.py	Wed Mar 28 16:02:00 2018 +0200
@@ -293,13 +293,13 @@
 
 
 @adapter_config(context=IPortlet, provides=IPortletConfiguration)
-def PortletConfigurationAdapter(portlet):
+def portlet_configuration_adapter(portlet):
     """Portlet configuration factory"""
     return PortletConfiguration(portlet)
 
 
 @adapter_config(context=IPortletConfiguration, provides=IPortletSettings)
-def PortletConfigurationSettingsAdapter(configuration):
+def portlet_configuration_settings_adapter(configuration):
     """Portlet configuration settings adapter"""
     return configuration.settings
 
--- a/src/pyams_portal/template.py	Wed Mar 28 15:34:15 2018 +0200
+++ b/src/pyams_portal/template.py	Wed Mar 28 16:02:00 2018 +0200
@@ -69,7 +69,7 @@
 
 
 @adapter_config(context=IPortalTemplateContainer, provides=IPortalTemplateContainerConfiguration)
-def PortalTemplateContainerConfigurationAdapter(context):
+def portal_template_container_configuration_adapter(context):
     """Portal template container configuration factory"""
     annotations = IAnnotations(context)
     config = annotations.get(TEMPLATE_CONTAINER_CONFIGURATION_KEY)
@@ -319,7 +319,7 @@
 
 
 @adapter_config(context=IPortalTemplate, provides=IPortalTemplateConfiguration)
-def PortalTemplateConfigurationFactory(context):
+def portal_template_configuration_factory(context):
     """Portal template configuration adapter"""
     annotations = IAnnotations(context)
     config = annotations.get(TEMPLATE_CONFIGURATION_KEY)
@@ -347,7 +347,7 @@
 #
 
 @adapter_config(context=IPortalTemplate, provides=IPortalPortletsConfiguration)
-def PortalTemplatePortletsConfigurationAdapter(template):
+def portal_template_portlets_configuration_adapter(template):
     """Portal template portlets configuration adapter"""
     annotations = IAnnotations(template)
     config = annotations.get(PORTLETS_CONFIGURATION_KEY)