Compare commits
4 Commits
master
...
b8c3e03348
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8c3e03348 | ||
|
|
252e176e9d | ||
|
|
30c540b6f9 | ||
|
|
778753afd6 |
@@ -80,17 +80,10 @@ class MiVista(APIView):
|
|||||||
pre-dev → dev → master
|
pre-dev → dev → master
|
||||||
```
|
```
|
||||||
|
|
||||||
- `pre-dev`: desarrollo activo — aquí entran todos los cambios
|
- `pre-dev`: desarrollo activo
|
||||||
- `dev`: validación previa a producción
|
- `dev`: validación previa a producción
|
||||||
- `master`: producción estable
|
- `master`: producción estable
|
||||||
- Merges siempre con `--no-ff`
|
- Merges siempre con `--no-ff`
|
||||||
- **NUNCA** propagar en sentido inverso (master → dev o dev → pre-dev)
|
|
||||||
- Secuencia correcta:
|
|
||||||
```bash
|
|
||||||
git checkout pre-dev && git merge <mi-cambio> --no-ff
|
|
||||||
git checkout dev && git merge pre-dev --no-ff && git push origin dev
|
|
||||||
git checkout master && git merge dev --no-ff && git push origin master
|
|
||||||
```
|
|
||||||
|
|
||||||
## Estructura de app Django
|
## Estructura de app Django
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import os
|
import os
|
||||||
from django.core.asgi import get_asgi_application
|
from django.core.asgi import get_asgi_application
|
||||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api_config.settings')
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api_hub_dispatcher.settings')
|
||||||
application = get_asgi_application()
|
application = get_asgi_application()
|
||||||
@@ -74,7 +74,7 @@ MIDDLEWARE = [
|
|||||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||||
]
|
]
|
||||||
|
|
||||||
ROOT_URLCONF = 'api_config.urls'
|
ROOT_URLCONF = 'api_hub_dispatcher.urls'
|
||||||
|
|
||||||
TEMPLATES = [
|
TEMPLATES = [
|
||||||
{
|
{
|
||||||
@@ -92,7 +92,7 @@ TEMPLATES = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
WSGI_APPLICATION = 'api_config.wsgi.application'
|
WSGI_APPLICATION = 'api_hub_dispatcher.wsgi.application'
|
||||||
|
|
||||||
# 3. DATABASE
|
# 3. DATABASE
|
||||||
# En producción (cuando DB_HOST está definido) usa PostgreSQL.
|
# En producción (cuando DB_HOST está definido) usa PostgreSQL.
|
||||||
|
|||||||
@@ -2,6 +2,6 @@ import os
|
|||||||
from django.core.wsgi import get_wsgi_application
|
from django.core.wsgi import get_wsgi_application
|
||||||
|
|
||||||
# Este es el enlace con tus configuraciones
|
# Este es el enlace con tus configuraciones
|
||||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api_config.settings')
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'api_hub_dispatcher.settings')
|
||||||
|
|
||||||
application = get_wsgi_application()
|
application = get_wsgi_application()
|
||||||
@@ -18,7 +18,7 @@ class Admin:
|
|||||||
|
|
||||||
# 1. Autenticación
|
# 1. Autenticación
|
||||||
user = authenticate(username=username, password=password)
|
user = authenticate(username=username, password=password)
|
||||||
|
|
||||||
if user is not None:
|
if user is not None:
|
||||||
# 2. Generación de JWT (Access & Refresh)
|
# 2. Generación de JWT (Access & Refresh)
|
||||||
refresh = RefreshToken.for_user(user)
|
refresh = RefreshToken.for_user(user)
|
||||||
|
|||||||
Reference in New Issue
Block a user