Re: Optional Nested Relationship Response

2019-03-07 Thread Fabio Andrés García Sánchez
> > > On Friday, March 8, 2019 at 11:58:25 AM UTC+7, Fabio Andrés García Sánchez > wrote: >> >> You can do it using two different AlbumSerializers. One of them without >> tracks. >> Then, in the view, overriding the method get_serializer you can get the

Re: Optional Nested Relationship Response

2019-03-07 Thread Fabio Andrés García Sánchez
> You received this message because you are subscribed to the Google Groups > "Django REST framework" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-rest-framework+unsubscr...@googlegroups.com. > For more options, vis

How to test @detail_route and @list_route properly using coverage

2019-03-06 Thread Fabio Andrés García Sánchez
I'm using Django Rest Framework 3.7.7. What I want to do is test all my list_route and detail_route methods on the view to achieve 100% with coverage but: 1. I couldn't get to pass values when trying to test a detail_route. I got to call the method, using .post but on the view, it shows

Unable to test @detail_route and @list_route using Django Rest Framework 3.7.7

2019-03-06 Thread Fabio Andrés García Sánchez
I'm using Django Rest Framework 3.7.7. What I want to do is test all my list_route and detail_route methods on the view to achieve 100% with coverage but: 1. I couldn't get to pass values when trying to test a detail_route. I got to call the method, using .post but on the view, it shows