src/pyams_gis/configuration.py
changeset 35 39f7e00f9e51
parent 0 c73bb834ccbe
child 41 5d273277716b
equal deleted inserted replaced
34:477eb78e8ec1 35:39f7e00f9e51
    82 
    82 
    83 MAP_CONFIGURATION_KEY = 'pyams_gis.map.configuration'
    83 MAP_CONFIGURATION_KEY = 'pyams_gis.map.configuration'
    84 
    84 
    85 
    85 
    86 @adapter_config(context=IMapConfigurationTarget, provides=IMapConfiguration)
    86 @adapter_config(context=IMapConfigurationTarget, provides=IMapConfiguration)
    87 def MapConfigurationFactory(context):
    87 def map_configuration_factory(context):
    88     """Map configuration factory"""
    88     """Map configuration factory"""
    89     annotations = IAnnotations(context)
    89     annotations = IAnnotations(context)
    90     configuration = annotations.get(MAP_CONFIGURATION_KEY)
    90     configuration = annotations.get(MAP_CONFIGURATION_KEY)
    91     if configuration is None:
    91     if configuration is None:
    92         configuration = annotations[MAP_CONFIGURATION_KEY] = MapConfiguration()
    92         configuration = annotations[MAP_CONFIGURATION_KEY] = MapConfiguration()