exibindo dados do banco no html

This commit is contained in:
2024-12-10 20:42:10 -03:00
parent 91dde27384
commit fbb326f347
26 changed files with 170 additions and 24 deletions

View File

@@ -1,5 +1,8 @@
from django.shortcuts import render
from products.models import Product
def products(request):
return render(request, 'products.html')
protucts = Product.objects.all()
return render(request, 'products.html', {'products': protucts})