35837-vm/core/views.py
2025-11-18 19:58:02 +00:00

9 lines
244 B
Python

from django.shortcuts import render
from .models import Product
def index(request):
products = Product.objects.filter(available=True)
context = {
'products': products
}
return render(request, 'core/index.html', context)