Hi,

I thing you have an error in you queryset.



On Mon, Dec 14, 2015 at 3:47 PM, Bruno A. <[email protected]> wrote:

> Also having your models would be helpful.
>
>
> On Saturday, 12 December 2015 02:21:07 UTC, Daniel Chimeno wrote:
>>
>> This question is more about DRF <http://www.django-rest-framework.org/> than
>> Django itself, I haven't use it for a while so I can't answer you,
>> but please, put the code in a proper format way or pastebin, and say the
>> version you are using both Django and DRF
>> in order other people can answer you.
>>
>>
>> El jueves, 10 de diciembre de 2015, 19:27:26 (UTC+1), miguel angel lopez
>> mendo escribió:
>>>
>>> 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 https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/811a040b-6ad0-49a8-be5d-2e2981ff4e4b%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/811a040b-6ad0-49a8-be5d-2e2981ff4e4b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*Warm Regard:-*
*Mandeep Kumar*
<http://www.linkedin.com/in/mandeep444>
<http://www.techgig.com/mandeep444>

-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJri7SShng2GOy7Byy9DQqoEe94XyJ0z%3DAqa3Ciz5_XVKG-Y4w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to