+admin.py

This commit is contained in:
jp.av.dev 2020-11-15 02:16:55 -03:00
parent 2d1084018a
commit 617771f4d5

View File

@ -0,0 +1,19 @@
from django.contrib import admin
from gestionPedidos.models import Clientes, Articulos, Pedidos
class ClientesAdmin(admin.ModelAdmin):
list_display = ("nombre", "direccion", "fono")
search_fields = ("nombre","fono")
class ArticulosAdmin(admin.ModelAdmin):
list_filter = ("seccion",)
class PedidosAdmin(admin.ModelAdmin):
list_display = ("numero", "fecha")
list_filter = ("fecha",)
date_hierarchy = "fecha"
admin.site.register(Clientes, ClientesAdmin)
admin.site.register(Articulos, ArticulosAdmin)
admin.site.register(Pedidos, PedidosAdmin)