I have a view that returns JSON data. I want to get that data from another view as well, so I tried calling the JSON view from it. However, a Response
was ret
The decorator of a view-function can convert your return-value in a Response object depending on it's type (more information about these rules check out here). The json data is stored in r.response
where r
is the Response
object.
The better solution is to create a separate function, which returns the json data, which can be called from two different view-functions.