Good morning
I am trying to change what I have done in forms to serializers and I find that with forms, depending on a date that is entered, it calculates another date for another field.
I have seen that the SerializedMethodField does what I need but it does not work to save data, what other options do I have?
FechaValidoHasta = serializers.SerializerMethodField()
def get_FechaValidoHasta(self, obj):
seisMeses = relativedelta(months=6)
return obj.FechaValidoDesde+seisMeses
It seems like it could be using Custom Fields, but I do not see how to reference the other field when calculating the date.
Thanks!