mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-05 13:35:42 +00:00
exibindo dados do banco no html
This commit is contained in:
Binary file not shown.
@@ -1,12 +1,33 @@
|
||||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
|
||||
|
||||
|
||||
|
||||
{% block 'title' %}
|
||||
Type Pay
|
||||
{% block 'head' %}
|
||||
<link rel="stylesheet" href="{% static 'mesas/css/mesas.css' %}">
|
||||
{% endblock %}
|
||||
|
||||
{% block 'title' %}
|
||||
Produtos
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
|
||||
{% block 'body' %}
|
||||
Body Type Pay
|
||||
|
||||
|
||||
<body>
|
||||
<div class="grid-container">
|
||||
|
||||
{% for product in products %}
|
||||
|
||||
<div class="card">{{product.name}}</div>
|
||||
|
||||
{% endfor %}
|
||||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
@@ -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})
|
||||
Reference in New Issue
Block a user