You will need a model to store the order details, and a second model to store items bought, including their price and quantity. Edit the models.py file of the orders application and add the following code to it:
from django.db import modelsfrom shop.models import Productclass Order(models.Model): first_name = models.CharField(max_length=50) last_name = models.CharField(max_length=50) email = models.EmailField() address = models.CharField(max_length=250) postal_code = models.CharField(max_length=20) city = models.CharField(max_length=100) created = models.DateTimeField(auto_now_add=True) updated = models.DateTimeField(auto_now=True) paid = models.BooleanField(default=False) class Meta: ordering = ('-created',) def __str__(self): ...