Registering customer orders

When a shopping cart is checked out, you need to save an order into the database. Orders will contain information about customers and the products they are buying.

Create a new application for managing customer orders using the following command:

python manage.py startapp orders

Edit the settings.py file of your project and add the new application to the INSTALLED_APPS setting as follows:

INSTALLED_APPS = [    # ...    'orders.apps.OrdersConfig',]

You have activated the orders application.

Get Django 2 by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.