Re: Get filtered data from url

2018-10-26 Thread Clara Daia
I used one of the suggested third party libraries : specifically drf-nested-routers . The 'urls.py' code looks pretty much the same as the example. Em quinta-feira, 11 de outub

UniqueTogetherValidator does not work for 'simultaneous' creation of multiple instances

2018-10-26 Thread Clara Daia
Hello, I have a view that can create multiple instances of a model at once. The model has a unique_together constraint and I made a ModelSerializer based on it, something like class MyAttributeChangelog(models.Model): parent = models.ForeignKey(ParentModel, on_delete=models.CASCADE) sta

Re: Unit Testing Uploading CSV file

2018-10-26 Thread Jason
sounds like your view is a little wrong, because its not returning any response (eg None) On Friday, October 26, 2018 at 6:11:26 AM UTC-4, Alexander Lamas wrote: > > Hi All, > > I've created a DRF Web API application and I've got the following error > when running my unit test. > > *Message: Exp

Unit Testing Uploading CSV file

2018-10-26 Thread Alexander Lamas
Hi All, I've created a DRF Web API application and I've got the following error when running my unit test. *Message: Expected a `Response`, `HttpResponse` or `HttpStreamingResponse` to be returned from the view, but received a ``* My intention is to simulate my ajax call when uploading the fil