refactor: reorganizar estructura del proyecto al estándar app/api_config
All checks were successful
DEPLOY_MULTI_BRACH/pipeline/head This commit looks good
All checks were successful
DEPLOY_MULTI_BRACH/pipeline/head This commit looks good
- core/ → app/api_config/ - apps/backend_admin/ → app/backend_admin/ - apps/common/ → app/common/ - apps/promociones/ → app/promociones/ - manage.py → app/manage.py - Añadir app/requirements.txt - Actualizar todos los imports y referencias (DJANGO_SETTINGS_MODULE, ROOT_URLCONF, WSGI_APPLICATION, INSTALLED_APPS) - Actualizar Dockerfile con nuevo WORKDIR Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
6
app/common/apps.py
Normal file
6
app/common/apps.py
Normal file
@@ -0,0 +1,6 @@
|
||||
# apps/common/apps.py
|
||||
from django.apps import AppConfig
|
||||
|
||||
class CommonConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'apps.common' # <--- ESTO ES LO QUE DEBE PONER
|
||||
1
app/common/migrations/__init__.py
Normal file
1
app/common/migrations/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
# Archivo para marcar esta carpeta como paquete de migraciones
|
||||
11
app/common/utils.py
Normal file
11
app/common/utils.py
Normal file
@@ -0,0 +1,11 @@
|
||||
# Ejemplo de limpieza de tipos para SQL
|
||||
def clean_sql_string(value):
|
||||
if value is None:
|
||||
return ""
|
||||
return str(value).strip().replace("'", "''")
|
||||
|
||||
def clean_sql_int(value):
|
||||
try:
|
||||
return int(value)
|
||||
except (ValueError, TypeError):
|
||||
return 0
|
||||
Reference in New Issue
Block a user