Fix bug with products view config
This commit is contained in:
parent
cddb05d8fc
commit
855153f121
|
@ -542,6 +542,11 @@ class ProductsView(MasterView):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def defaults(cls, config):
|
def defaults(cls, config):
|
||||||
|
cls._product_defaults(config)
|
||||||
|
cls._defaults(config)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def _product_defaults(cls, config):
|
||||||
route_prefix = cls.get_route_prefix()
|
route_prefix = cls.get_route_prefix()
|
||||||
url_prefix = cls.get_url_prefix()
|
url_prefix = cls.get_url_prefix()
|
||||||
template_prefix = cls.get_template_prefix()
|
template_prefix = cls.get_template_prefix()
|
||||||
|
@ -569,8 +574,6 @@ class ProductsView(MasterView):
|
||||||
config.add_view(cls, attr='search', route_name='products.search',
|
config.add_view(cls, attr='search', route_name='products.search',
|
||||||
renderer='json', permission='products.view')
|
renderer='json', permission='products.view')
|
||||||
|
|
||||||
cls._defaults(config)
|
|
||||||
|
|
||||||
# product image
|
# product image
|
||||||
config.add_route('products.image', '/products/{uuid}/image')
|
config.add_route('products.image', '/products/{uuid}/image')
|
||||||
config.add_view(cls, attr='image', route_name='products.image')
|
config.add_view(cls, attr='image', route_name='products.image')
|
||||||
|
|
Loading…
Reference in a new issue