init

jp.av.dev 2020-11-13 02:49:45 -03:00
parent 6e0042d4ab
commit 5e19978a6b

41
3_Panel_Administrador.md Normal file

@ -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