![]() Recipes from my use of django rest framework taken from my latest project. In this article I’m going to share a bunch of The documentation of django rest framework is pretty extensive, there is a great tutorial, api docs and plenty of examples.īut reality is usually a bit more complex and you need to customize your use of the framework. It’s easy to set up, extensible and saves so much time. One of my favorite tools in my app development toolkit is django rest framework (drf), that makes developing REST APIs with python and django easy and fun. Unique together with a user that is not set in the form.Use string value in an API for a field that has more efficient DB representation (enum).Use a serializer for the query parameters. ![]() Add fields on the fly that aren’t present on the model.Different serializers for different methods within a viewset.Only show entities related to the current user. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |