@login_required
@enforce_shopping_cart_enabled
def show_cart(request):
 cart = Order.get_cart_for_user(request.user)
 (is_any_course_expired, expired_cart_items, expired_cart_item_names, valid_cart_item_tuples) = verify_for_closed_enrollment(request.user, cart)
 site_name = configuration_helpers.get_value('SITE_NAME', settings.SITE_NAME)
 if is_any_course_expired:
  for expired_item in expired_cart_items:
   Order.remove_cart_item_from_order(expired_item, request.user)
  cart.update_order_type()
 callback_url = request.build_absolute_uri(reverse('shoppingcart.views.postpay_callback'))
 form_html = render_purchase_form_html(cart, callback_url=callback_url)
 context = {'order': cart, 'shoppingcart_items': valid_cart_item_tuples, 'amount': cart.total_cost, 'is_course_enrollment_closed': is_any_course_expired, 'expired_course_names': expired_cart_item_names, 'site_name': site_name, 'form_html': form_html, 'currency_symbol': settings.PAID_COURSE_REGISTRATION_CURRENCY[1], 'currency': settings.PAID_COURSE_REGISTRATION_CURRENCY[0], 'enable_bulk_purchase': configuration_helpers.get_value('ENABLE_SHOPPING_CART_BULK_PURCHASE', True)}
 return render_to_response('shoppingcart/shopping_cart.html', context)

@ login_required @ enforce_shopping_cart_enabled def show_cart ( request ) : cart = Order . get_cart_for_user ( request . user ) ( is_any_course_expired , expired_cart_items , expired_cart_item_names , valid_cart_item_tuples ) = verify_for_closed_enrollment ( request . user , cart ) site_name = configuration_helpers . get_value ( 'SITE_NAME' , settings . SITE_NAME ) if is_any_course_expired : for expired_item in expired_cart_items : Order . remove_cart_item_from_order ( expired_item , request . user ) cart . update_order_type ( ) callback_url = request . build_absolute_uri ( reverse ( 'shoppingcart.views.postpay_callback' ) ) form_html = render_purchase_form_html ( cart , callback_url = callback_url ) context = { 'order' : cart , 'shoppingcart_items' : valid_cart_item_tuples , 'amount' : cart . total_cost , 'is_course_enrollment_closed' : is_any_course_expired , 'expired_course_names' : expired_cart_item_names , 'site_name' : site_name , 'form_html' : form_html , 'currency_symbol' : settings . PAID_COURSE_REGISTRATION_CURRENCY [ 1 ] , 'currency' : settings . PAID_COURSE_REGISTRATION_CURRENCY [ 0 ] , 'enable_bulk_purchase' : configuration_helpers . get_value ( 'ENABLE_SHOPPING_CART_BULK_PURCHASE' , True ) } return render_to_response ( 'shoppingcart/shopping_cart.html' , context )
this view shows cart items .