コード例 #1
0
ファイル: context_processors.py プロジェクト: bmac/evilsheep
def ecomstore(request):
    item_count = cart.cart_distinct_item_count(request)
    sub_cats = SubCategory.active.all()
    return {
        "site_name": settings.SITE_NAME,
        "meta_keywords": settings.META_KEYWORDS,
        "meta_description": settings.META_DESCRIPTION,
        "item_count": item_count,
        "sub_cats": sub_cats,
    }
コード例 #2
0
ファイル: views.py プロジェクト: bmac/evilsheep
def show_cart(request):
    page_title = 'Shopping Cart'
    cart_item_count = cart.cart_distinct_item_count(request)
    cart_items = cart.get_cart_items(request)
    cart_subtotal = cart.cart_subtotal(request)
    return render_to_response('cart/cart.html', locals(), context_instance=RequestContext(request))