+admin.py
This commit is contained in:
parent
2d1084018a
commit
617771f4d5
19
TiendaOnline/gestionPedidos/admin.py
Normal file
19
TiendaOnline/gestionPedidos/admin.py
Normal 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)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user