def _get_configuration_from_db(shop):
 configuration = {}
 for conf_item in ConfigurationItem.objects.filter(shop=shop):
  configuration[conf_item.key] = conf_item.value
 return configuration

def _get_configuration_from_db ( shop ) : configuration = { } for conf_item in ConfigurationItem . objects . filter ( shop = shop ) : configuration [ conf_item . key ] = conf_item . value return configuration
get global or shop specific configuration from database .