All Posts Create a Post
Converting django object values dict into native datatype
I’m trying to get specific fields from my database using the object.values() attribute, as such: stocks = Stock.objects.values("ticker", "stock", "exchange__exchange_code", "earnings_yield", "roic") The reason I’m not using Stock.objects.filter()... is because …
How to display serializer in delete action with django rest swagger
By default, django rest swagger doesn’t displayed the Serializer in DELETE method. But, for some reason I need to implement prevent deletion & force deletion case. So, basicly to implement …
Django rest clean up before validation
Sometime we need to clean up the value before it validated by an exiting validations. For example, when user sended an longitude and latitude data into backend with multiple length …
Awesome django books by agiliq.com
This awesome django books for refference is also open sourced at https://github.com/agiliq/books Django Admin Cookbook (Django 2.0) Django ORM Cookbook (Django 2.0) Building APIs with Django and Django Rest Framework …
Django Standard API Response Middleware for DRF
As you can see, if you using django-rest-framework, you will found many different response format. This middleware to solve all of these problems with implement the Standard API Response. All …