Get data from template to views in Django

  backend, django, html, mysql, python

How do i get the data (from database) in template to a view that i have for another app? I am building a very simple ecommerce website and would like to save the order of the users and save those products’ name and quantity in the table ‘Orders’. Here is a snap of my code to make it more clear:

Template code

Actual page display

My view

Source: Python Questions