Browse Source

Arreglos en paths a media

politica
Celestino Rey 9 months ago
parent
commit
a77dc22153
5 changed files with 27 additions and 3 deletions
  1. +1
    -1
      JugarAlPadel/K8S/Makefile
  2. +8
    -0
      JugarAlPadel/gestion_reservas/reymotausers/serializers.py
  3. +1
    -1
      ReyMotaAppsDj/K8S/Makefile
  4. +8
    -0
      ReyMotaAppsDj/reymota/repostajes/serializers.py
  5. +9
    -1
      ReyMotaAppsDj/reymota/reymotausers/serializers.py

+ 1
- 1
JugarAlPadel/K8S/Makefile View File

@ -2,7 +2,7 @@ export ARQUITECTURA := $(shell lscpu |grep itectur | tr -d ' '| cut -f2 -d':')
#export REGISTRY=localhost:5000
export REGISTRY=registry.reymota.es
export IMG_VERSION = 0.61
export IMG_VERSION = 0.62
export IMG_NGINX_VERSION = 2.3
# limpia todo


+ 8
- 0
JugarAlPadel/gestion_reservas/reymotausers/serializers.py View File

@ -1,3 +1,5 @@
import os
from rest_framework import serializers
from .models import ReyMotaUser
@ -6,3 +8,9 @@ class ReyMotaUserSerializer(serializers.ModelSerializer):
class Meta:
model = ReyMotaUser
fields = ['email', 'password', 'foto', 'is_superuser', 'is_staff', 'is_active', 'nombre', 'last_login']
def to_representation(self, instance):
ret = super().to_representation(instance)
ret['foto'] = "profile_images/" + os.path.basename(ret['foto'])
return ret

+ 1
- 1
ReyMotaAppsDj/K8S/Makefile View File

@ -1,7 +1,7 @@
export ARQUITECTURA := $(shell lscpu |grep itectur | tr -d ' '| cut -f2 -d':')
#export REGISTRY=registry.cube.local
export REGISTRY=registry.reymota.es
export IMG_VERSION = 0.54
export IMG_VERSION = 0.55
export IMG_NGINX_VERSION = 1.0
# limpia todo


+ 8
- 0
ReyMotaAppsDj/reymota/repostajes/serializers.py View File

@ -1,3 +1,5 @@
import os
from rest_framework import serializers
from .models import Vehiculo, Repostaje
@ -7,6 +9,12 @@ class VehiculoSerializer(serializers.ModelSerializer):
model = Vehiculo
fields = '__all__' # Incluir todos los campos del modelo
def to_representation(self, instance):
ret = super().to_representation(instance)
ret['foto'] = "vehiculos/" + os.path.basename(ret['foto'])
return ret
class RepostajeSerializer(serializers.ModelSerializer):
vehiculo_matricula = serializers.CharField(source='vehiculo.matricula', read_only=True)


+ 9
- 1
ReyMotaAppsDj/reymota/reymotausers/serializers.py View File

@ -1,3 +1,5 @@
import os
from rest_framework import serializers
from .models import ReyMotaUser
@ -5,4 +7,10 @@ from .models import ReyMotaUser
class ReyMotaUserSerializer(serializers.ModelSerializer):
class Meta:
model = ReyMotaUser
fields = '__all__' # Incluir todos los campos del modelo
fields = ['email', 'password', 'foto', 'is_superuser', 'is_staff', 'is_active', 'nombre', 'last_login']
def to_representation(self, instance):
ret = super().to_representation(instance)
ret['foto'] = "profile_images/" + os.path.basename(ret['foto'])
return ret

Loading…
Cancel
Save