rattail-demo/rattail_demo/web/views/products.py

29 lines
687 B
Python
Raw Permalink Normal View History

# -*- coding: utf-8; -*-
"""
Product views
"""
from webhelpers2.html import tags
from tailbone.views import products as base
class ProductView(base.ProductView):
"""
Product overrides for online demo
"""
def get_xref_links(self, product):
links = super(ProductView, self).get_xref_links(product)
if product.demo_shopfoo_product:
url = self.request.route_url('shopfoo.products.view',
uuid=product.demo_shopfoo_product.uuid)
links.append(tags.link_to("View Shopfoo Product", url))
return links
def includeme(config):
2022-11-21 22:22:46 -06:00
base.defaults(config, **{'ProductView': ProductView})