def get_format_info(self):
        if self.active_formats == True:
            return {
                "product_cols": self.product_cols,
                "product_rows": self.product_rows
            }
        else:
            try:
                # TODO: Use cache here. Maybe we need a lfs_get_object,
                # which raise a ObjectDoesNotExist if the object does not
                # exist
                from lfs.core.models import Shop
                shop = Shop.objects.get(pk=1)
            except ObjectDoesNotExist:
                return {
                    "product_cols": 3,
                    "product_rows": 3
                }
            else:
                return {
                    "product_cols": shop.product_cols,
                    "product_rows": shop.product_rows
                }
Returns format information.
dataset/ETHPy150Open diefenbach/django-lfs/lfs/manufacturer/models.py/Manufacturer.get_format_info