Removing the movies’ dummy data
The first step to extract database data is to remove the movies’ dummy data. In /movies/views.py
, remove the movies
variable, as shown in the following in bold:
from django.shortcuts import render movies = [ { 'id': 1, 'name': 'Inception', 'price': 12, 'description': 'A mind-bending heist thriller.' }, { 'id': 2, 'name': 'Avatar', 'price': 13, 'description': 'A journey to a distant world and the battle for resources.' }, { 'id': 3, 'name': &apos...