[PyDelhi] [Query] [DRF] Raw SQL Query by passing Model and Model Serializer
Raakesh kumar
kumar3180 at gmail.com
Fri Oct 30 17:56:17 EDT 2015
Hi Aniket,
On Sat, Oct 31, 2015 at 2:53 AM, Aniket Maithani <maithani.aniket at gmail.com>
wrote:
>
> Okay. So I am actually creating an API for one of the Android based
> application. You can read about it here [0]. Now what I want is I have a
> dataset now all I want is to get the result from the database using raw
> query and the result of that query should be in JSON format.
>
> To explain for instance :
> Endpoint : /search
> request :
> {
> "name": "abc"
> }
>
> Response
> {
> "name":"abc"
> "foo":"bar"
> "foo1":"bar1"
> }
>
> Now I want all this to be done without the use of actually putting models
> in there.
>
> Apologies, If I am unable to be clear on explaining what I want to do.
>
Just for my curiosity, why do you want to remove model interaction? I mean
you can achieve it with models also
--
Regards
RAKESH KUMAR
http://www.raakeshkumar.in
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ncr-python.in/attachments/20151031/405847ed/attachment.html>
More information about the Ncr-Python.in
mailing list