29 ms·
Your comment is being downvoted because DRF clearly does a whole lot more than just serialising the response dictionary or adding pagination, you should really
by mastazi 10y ago
Your comment is being downvoted because DRF clearly does a whole lot more than just serialising the response dictionary or adding pagination, you should really have a look at the documentation.
However, I still think that Django should have something like the "JSONResponse mixin example"[1] built-in by default; sometimes you are building a product which is not an API but you still need the occasional RESTful endpoint and, in those cases, something like DRF would be overkill.
[1] https://docs.djangoproject.com/en/1.10/topics/class-based-views/mixins/#jsonresponsemixin-example https://docs.djangoproject.com/en/1.10/topics/class-based-vi...
- ralmidani 10y agoYou could always import DRF's serializers and parsers/generators without committing to the entire framework. Django does plan on bringing DRF's content negotiation into the main framework: https://www.djangoproject.com/weblog/2015/dec/11/django-awarded-moss-grant/ https://www.djangoproject.com/weblog/2015/dec/11/django-awar...
- mastazi 10y agoThanks, that would be a reasonably light-weight alternative.