Hi,

You just made a good point ;)
The tutorial was written way before JSONResponse was introduced in Django.
I just checked this was introduced in Django 1.7. Since DRF now supports 1.8+ 
we could use Django’s JSONResponse indeed.

Regards,
Xavier Ordoquy,
Linovia.

> Le 20 févr. 2017 à 09:40, Anupam Jain <[email protected]> a écrit :
> 
> I was going through the tutorial-1 here 
> <http://www.django-rest-framework.org/tutorial/1-serialization/#writing-regular-django-views-using-our-serializer>.
>  Can we not directly use Django's JSONResponse 
> <https://docs.djangoproject.com/en/1.10/ref/request-response/#jsonresponse-objects>
>  class here instead of declaring it separately?
> 
> (I may be missing something since just getting started with DRF)
> 
> thanks
> Anupam
> 
> -- 
> 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 [email protected] 
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to