From 3eedecef0aaa05e45adc1bd902ffd2c133bda630 Mon Sep 17 00:00:00 2001 From: "jp.av.dev" Date: Fri, 13 Nov 2020 03:23:19 -0300 Subject: [PATCH] vid18 --- 3_Panel_Administrador.md | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/3_Panel_Administrador.md b/3_Panel_Administrador.md index 29b1414..72482de 100644 --- a/3_Panel_Administrador.md +++ b/3_Panel_Administrador.md @@ -26,7 +26,6 @@ Email address: admin@gitea.com Password: Password (again): Superuser created successfully. - ``` ### Explorando la BD *tabla auth_user* @@ -39,3 +38,37 @@ Superuser created successfully. ### Administrar tablas desde el Panel +*admin.py* +``` +from django.contrib import admin +from gestionPedidos.models import Clientes + +admin.site.register(Clientes) +``` + +### Configurar campo 'email' como opcional, clase Cliente +*models.py* +``` +... +class Clientes(models.Model): + ... + email = models.EmailField(blank=True, null=True) + ... +``` +*cambios en el modelo, requieren migraciĆ³n* +`python3 manage.py makemigrations` +`python3 manage.py migrate` + +### PersonalizaciĆ³n del Panel + + + +### Modificar nombre visible de tablas + + + +### Agregar campos de tablas a modificar + + + +### Agregar campo de busqueda \ No newline at end of file