You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

11 lines
349 B

from .models import ProductsInBasket
def getting_basket_info(request):
session_key = request.session.session_key
if not session_key:
request.session.cycle_key()
products_in_basket = ProductsInBasket.objects.filter(session_key=session_key, is_active=True)
products_total_nmb = products_in_basket.count()
return locals()