diff --git a/3_Panel_Administrador.md b/3_Panel_Administrador.md new file mode 100644 index 0000000..29b1414 --- /dev/null +++ b/3_Panel_Administrador.md @@ -0,0 +1,41 @@ +## Panel de Administrador + +### Activo por defecto + +*settings.py* +``` +... +INSTALLED_APPS = [ + 'django.contrib.admin', + ... +``` +*urls.py* +``` +... +urlpatterns = [ + path('admin/', admin.site.urls), + ... +``` +[*enlace a admin*](http://192.168.0.4:8000/admin/) + +### Crear SuperUsuario, con perfĂ­l de administrador +``` +python3 manage.py createsuperuser +Username (leave blank to use 'sat'): Roberrrt +Email address: admin@gitea.com +Password: +Password (again): +Superuser created successfully. + +``` +### Explorando la BD +*tabla auth_user* + +|id|password|last_login|is_superuser|username|first_name|last_name|email|is_staff|is_active|date_joined| +|--|--------|----------|------------|--------|----------|---------|-----|--------|---------|-----------| +|1|pbkdf2_sha256$216000$zw4Zuc6weyCN$Vwn8SM6zPA3hIofcmQiz4mIuU6tL7U/vvWs=|2020-11-13 02:40:20|true|Roberrrt|||admin@gitea.com|true|true|2020-11-13 02:38:41| +|2|pbkdf2_sha256$216000$188Gs3iRpsWb$X49lPG/2IlRlsaanXqUBZ6YOMIvctZ+U0Gg=||false|Roberrrt2||||false|true|2020-11-13 02:41:43| + + +### Administrar tablas desde el Panel +