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,6 +1,9 @@
from django.shortcuts import render
from mesas.models import Mesa
# Create your views here.
def mesas(request):
return render(request, 'mesas.html', {'mesas': ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12']})
mesas = Mesa.objects.all()
return render(request, 'mesas.html', {'mesas': mesas})