Complete the code to import the Django shortcut for rendering templates.
from django.shortcuts import [1]
The render function helps quickly display HTML templates with data in Django.
Complete the code to define a simple Django model with a name field.
class Product(models.Model): name = models.[1](max_length=100)
CharField is used for short text fields like names in Django models.
Fix the error in the view function to return a rendered template.
def home(request): return [1](request, 'home.html')
The render function returns a complete webpage by combining a template and data.
Fill both blanks to create a URL pattern for the home view.
from django.urls import [1] urlpatterns = [ [2]('home/', views.home, name='home'), ]
path is the modern way to define URL patterns in Django.
Fill all three blanks to create a dictionary comprehension filtering products by price.
filtered = {product.name: product.price for product in products if product.price [1] [2]
# Only include products with price [3] 20This comprehension keeps products with price greater than 20.
