refactor codigo
This commit is contained in:
5
apps/common/apps.py
Normal file
5
apps/common/apps.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
class CommonConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'apps.common'
|
||||
@@ -1,5 +1,5 @@
|
||||
from django.db import connection
|
||||
from common.utils import clean_sql_string, clean_sql_int
|
||||
from apps.common.utils import clean_sql_string, clean_sql_int
|
||||
|
||||
def getData(params):
|
||||
"""
|
||||
@@ -39,9 +39,9 @@ def setData(params):
|
||||
WHERE p.categoria_id = c.id AND p.id = %s
|
||||
"""
|
||||
|
||||
# Fecha en formato Año-Día-Mes (Y-d-m)
|
||||
# Fecha en formato YYYY-MM-DD para SQL
|
||||
import datetime
|
||||
fecha_hoy = datetime.datetime.now().strftime('%Y-%d-%m')
|
||||
fecha_hoy = datetime.datetime.now().strftime('%Y-%m-%d')
|
||||
|
||||
parameter_dict = [
|
||||
clean_sql_string(params.get('nombre')),
|
||||
|
||||
5
apps/promociones/apps.py
Normal file
5
apps/promociones/apps.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
class PromocionesConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'apps.promociones'
|
||||
Reference in New Issue
Block a user