i have this serializers
class ValuarCoche(serializers.ModelSerializer):
class Meta:
model = Valuacion
depth = 6
fields = ('coche','Precio_Venta','Precio_Compra')
class CocheSerializer2(serializers.ModelSerializer):
valuacion = ValuarCoche(many=True)
class Meta:
model = Coche
fields = ('id', 'marca', 'modelo', 'version',
'estado','anio','timestamp','valuacion')
but don't work i need that print
{
"id": 3,
"marca": {
"id": 1,
"nombre": "Acura"
},
"modelo": {
"id": 1,
"nombre": "ILX"
},
"version": "a5",
"estado": "1",
"anio": 2015,
"timestamp": "2015-12-08T19:12:05.887126Z"
"Precio_Venta": 0,
"Precio_Compra": 0
},
the error is the next
<https://lh3.googleusercontent.com/-cP4eP6a_c9Q/VmnDtYHYJFI/AAAAAAAAAig/vixAFfQisos/s1600/Captura%2Bde%2Bpantalla%2B2015-12-10%2Ba%2Blas%2B12.25.13%2Bp.m..png>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/8e1a6157-63d4-4cbb-9df0-ad637202c72c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.