📅  最后修改于: 2022-03-11 14:45:10.267000             🧑  作者: Mango
As per documentation,
Using in combination with django-rest-framework
When creating a new viewset , make sure to override get_queryset method, using queryset as a property won’t work because it is being evaluated once, before any language was set.
****
So depending on your needs you can create a class inheriting from drf (for example ViewSet), obtaining the language code from request and replacing the get_queryset method to filter by language.