ソースを参照

CAmbio de versión

Celestino Rey 1 年間 前
親
コミット
34a532cd87
4 ファイル変更、13 行追加、10 行削除
  1. 4 0
      K8S/Makefile
  2. 2 0
      entrypoint.sh
  3. 4 1
      src/finanzas/models.py
  4. 3 9
      src/misfinanzas/settings.py

+ 4 - 0
K8S/Makefile

@@ -1,7 +1,11 @@
 export ARQUITECTURA := $(shell lscpu |grep itectur | tr -d ' '| cut -f2 -d':')
 export REGISTRY=registry.reymota.es
 export IMG_VERSION = 0.42
+<<<<<<< HEAD
 export IMG_NGINX_VERSION = 1.4
+=======
+export IMG_NGINX_VERSION = 1.3
+>>>>>>> 40b984bb231e33cffb5cabf9a577dd2cb2c26ff9
 
 # limpia todo
 all: imagen clean install

+ 2 - 0
entrypoint.sh

@@ -1,5 +1,7 @@
 #!/bin/bash
 
+# Este es para K8S
+
 if [ "$DATABASE" = "postgres" ]
 then
     echo "Waiting for postgres..."

+ 4 - 1
src/finanzas/models.py

@@ -80,4 +80,7 @@ class TransaccionRecurrente(models.Model):
     ultima_ejecucion = models.DateField(null=True, blank=True)
 
     def __str__(self):
-        return f"{self.descripcion or 'Recurrente'}: {self.monto} € cada mes"
+        if self.semana:
+            return f"{self.descripcion or 'Recurrente'}: {self.monto} € cada mes el día {self.dia_del_mes} o el {self.semana}º {self.dia_semana} de la semana"
+        else:
+            return f"{self.descripcion or 'Recurrente'}: {self.monto} € cada mes el día {self.dia_del_mes}"

+ 3 - 9
src/misfinanzas/settings.py

@@ -16,7 +16,7 @@ import logging
 
 
 APP_NAME = "Finanzas"
-APP_VERSION = os.environ.get("APP_VERSION", "17.0.5")  # Valor por defecto si no está definido
+APP_VERSION = os.environ.get("APP_VERSION", "17.0.6")  # Valor por defecto si no está definido
 IMG_VERSION = os.environ.get("IMG_VERSION", "0.0.0-dev")  # Valor por defecto si no está definido
 
 
@@ -31,14 +31,14 @@ BASE_DIR = Path(__file__).resolve().parent.parent
 SECRET_KEY = 'django-insecure-^9*3@g$5brgjmhv&h!h*)c9kp)8i5tnqee_eu+fi728@g96#8&'
 
 # SECURITY WARNING: don't run with debug turned on in production!
-DEBUG = True
-
 DEBUG = os.environ.get('DEBUG', 'False') == 'True'
 OPENSHIFT = os.environ.get('OPENSHIFT', 'False') == 'True'
 LOCAL = os.environ.get('LOCAL', 'False') == 'True'
 
 ALLOWED_HOSTS = [".ocp-cluster.reymota.lab", ".reymota.es", ".reymota.lab", "127.0.0.1", "localhost"]
 
+CSRF_TRUSTED_ORIGINS = ["https://*.ocp-cluster.reymota.lab", "https://*.reymota.es", "http://*.rancher.reymota.lab"]
+
 
 # Application definition
 
@@ -110,10 +110,6 @@ else:
         'default': {
             "ENGINE": "django.db.backends.sqlite3",
             "NAME": BASE_DIR / "db.sqlite3",
-            "USER": "creylopez",
-            "PASSWORD": "Dsa-0213",
-            "HOST": "postgresql",
-            "PORT": "5432",
         }
     }
 
@@ -176,8 +172,6 @@ LOGOUT_REDIRECT_URL = 'dashboard'
 
 AUTH_USER_MODEL = "reymotausers.ReyMotaUser"
 
-CSRF_TRUSTED_ORIGINS = ["https://*.ocp-cluster.reymota.lab", "https://*.reymota.es", "http://*.rancher.reymota.lab"]
-
 LOGGING = {
     'version': 1,
     'disable_existing_loggers': False,