[Answered ]-Django : cart = self.session[settings.CART_SESSION_ID] = {} giving me unsupported operand type(s) for +: 'float' and 'str' error

1👍

Likely you have set the SESSION_COOKIE_AGE setting [Django-doc] as a string, like '1209600', whereas it should be a number, so:

# settings.py

SESSION_COOKIE_AGE = 1209600  # 🖘 not a string (i.e. not '1209600')

Leave a comment