mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-05 13:35:42 +00:00
criado metodo de mais vendidos no comandas.models | limitar lista de products a 15 itens
This commit is contained in:
Binary file not shown.
@@ -2,6 +2,7 @@ from django.db import models
|
||||
|
||||
from categories.models import Categories
|
||||
|
||||
|
||||
# Create your models here.
|
||||
class Product(models.Model):
|
||||
id = models.AutoField(primary_key=True)
|
||||
@@ -15,4 +16,4 @@ class Product(models.Model):
|
||||
active = models.BooleanField(default=True)
|
||||
|
||||
def __str__(self) -> str:
|
||||
return f"{self.id} - {self.name} - {self.price} - {self.category} - {self.cuisine} - {self.active} "
|
||||
return f"{self.id} - {self.name} - {self.price} - {self.category} - {self.cuisine} - {self.active} "
|
||||
|
||||
@@ -19,6 +19,7 @@ Produtos
|
||||
<button class="btn-primary"
|
||||
onclick="openModal()" id="openModal">Novo Produto</button>
|
||||
<input type="text" id="search-product" name="search-product" placeholder="Buscar Produto" hx-get="{% url 'searchProduct' %}" hx-trigger="keyup" hx-target="#product-list">
|
||||
<a href="https://raulrockbar.blogspot.com/p/cardapio.html" target="_blank">Cardápio Digital</a>
|
||||
</div>
|
||||
|
||||
<table id="product-list">
|
||||
|
||||
Reference in New Issue
Block a user