Cart for online-shop

Hello, I have begun coding backend-part for online-shop using Django. I have some problems with the cart, I read many directories and videos, but can’t find a solution for this problem. Have added checking for the items in the cart. The cart is empty, don’t understand why it’s doesn’t work.
I need to show products that was added in the cart.

Piece of code: https://github.com/LeonardoBigShot/online-shop.git

For us to help you, you’re going to need to provide a lot more specific information, including posting the relevent code here. You’ll need to explain exactly what problem you’re having, and what you’re expecting to have happen that isn’t. Providing this information in the context of some sample data may help.

We’re probably going to need to see the models, views, and forms involved. If you’re using JavaScript for any client-side activities, let us know what JavaScript libraries you’re using, and include any relevent JavaScript code needed to understand what you’re trying to do.

Also, when posting code, templates, html, etc, here enclose each block of lines between lines of three backtick - ` characters. That means you’ll have a line of ```, then your lines of code, then another line of ```. Do not post screenshots or images of code or templates.

Thanks for your answer. Question have been edited

With a brief sight to your code, I am not sure but it looks like you have made web development in Java EE in the past, am I wrong?

IMHO it could be more idiomatic to build a cart around a Django Model, the session based cart is harder to debug, maintain and extends.
Now returning to your code, I can be wrong but Don’t you need anther construction in order to use values() method? Have you tried in console and what type of returning you have?

I have never doing backend for web in the past, but I’m using Java to develop application.

Django is a new for me as well as python, so I was doing it using video-tutorials. There is that working, but in my project doesn’t

Does this video tutorial have some source code?
If that´s the case we could compare both codes and see if there is a problem.

here is a source code from tutorial

If someone can help me understand something about django using skype or something I would be very grateful

Have you register your context processor?

idk, when I can check this?

TEMPLATES = [

{

    'BACKEND': 'django.template.backends.django.DjangoTemplates',

    'DIRS': [os.path.join(BASE_DIR)],

    'APP_DIRS': True,

    'OPTIONS': {

        'context_processors': [

            'django.template.context_processors.debug',

            'django.template.context_processors.request',

            'django.contrib.auth.context_processors.auth',

            'django.contrib.messages.context_processors.messages',

            'cart.context_processors.cart',

        ],

    },

},

]

Every thing looks fine, I don’t know what the problem could be.

Here is full code of my site, but without templates of the main site

I found that cart haven’t saved on database. It could be problem