shop_config Config get_shop_config def _get_shop_config cls Convenienc

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
shop_config = Config.get_shop_config()
def _get_shop_config(cls):
"""Convenience method to get the current shop config"""
try:
shop_config = cls.objects.get(site=settings.SITE_ID)
except Config.DoesNotExist:
log.warning("No Shop Config found, using test shop config.")
shop_config = NullConfig()
return shop_config
get_shop_config = classmethod(_get_shop_config)