2
votes
129
views
Django Standard API Response Middleware for DRF
posted at Dec. 12, 2019, 8:27 a.m. - 3 months, 3 weeks ago

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 Standard API Response. All HTTP Response …

0
votes
18
views
How to create Django Language Middleware
posted at March 21, 2020, 1:01 p.m. - 1 week, 4 days ago

This example below to setup default language code as id (Indonesian). Your file middleware.py # -*- coding: utf-8 -*- from django.conf import settings from django.utils import translation from django.utils.deprecation import …