def display_bestsellers(request, count=0, template="product/best_sellers.html"): """Display a list of the products which have sold the most""" if count == 0: count = config_value("PRODUCT", "NUM_PAGINATED") ctx = RequestContext(request, {"products": bestsellers(count)}) return render_to_response(template, ctx)
def best_selling_products_list(count): """Get a list of best selling products""" try: ct = int(count) except ValueError: ct = config_value('PRODUCT','NUM_PAGINATED') return bestsellers(ct)
def best_selling_products_list(count): """Get a list of best selling products""" try: ct = int(count) except ValueError: ct = config_value('PRODUCT', 'NUM_PAGINATED') return bestsellers(ct)
def display_bestsellers(request, count=0, template='product/best_sellers.html'): """Display a list of the products which have sold the most""" if count == 0: count = config_value('PRODUCT','NUM_PAGINATED') ctx = RequestContext(request, { 'products' : bestsellers(count), }) return render_to_response(template, context_instance=ctx)
def display_bestsellers(request, count=0, template='product/best_sellers.html'): """Display a list of the products which have sold the most""" if count == 0: count = config_value('PRODUCT', 'NUM_PAGINATED') ctx = RequestContext(request, { 'products': bestsellers(count), }) return render_to_response(template, context_instance=ctx)
def display_bestsellers(request, count=0, template='product/best_sellers.html'): """Display a list of the products which have sold the most""" if count == 0: count = config_value('PRODUCT', 'NUM_PAGINATED') ctx = { 'products': bestsellers(count), } return render(request, template, ctx)
def bestsellers(n): return bestsellers(n)
def get_queryset(self): if self.count == 0: self.count = config_value('PRODUCT', 'NUM_PAGINATED') return bestsellers(self.count)