Skip to main content

drf-translated

django-modeltranslation DRF serializers

Features

  • Query/context translation support
  • Highly customizable

Installation

pip install drf-translated

Usage

Create a drf_translated.serializers.TranslatedModelSerializer serializer for your registered translation model:

from drf_translated.serializers import TranslatedModelSerializer

class MovieSerializer(TranslatedModelSerializer):
  class Meta:
    model = Movie

    fields = '__all__'
Setting Default Description
DRF_TRANSLATED_QUERY_PARAM language Query language param to convert translated values from dict to str
DRF_TRANSLATED_LOCALE_CONTEXT locale Serializer context key for getting translation language

Metadata

Release files for drf-translated 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for drf-translated 0.0.1
File Size Uploaded
drf-translated-0.0.1.tar.gz 2.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for drf-translated 0.0.1
File Interpreter ABI Platform
drf_translated-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 4.6 kB

Release files / drf-translated-0.0.1.tar.gz

Download URL drf-translated-0.0.1.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f3c468ef20cff7f2c81d2650322f14b0cfed444b84c41a60246cf11bdd3c0e72
BLAKE2b-256 checksum
How to use checksums
6c080c4715f6abb1be178d7d9554f037f7c0b3f5bcad9e1e1b8595aedd58b4e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Release files / drf_translated-0.0.1-py3-none-any.whl

Download URL drf_translated-0.0.1-py3-none-any.whl
Size 2.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef6c9fa3ac2ce50852840d30d0081f25b44d8928ac50ac2edd38384099d027c1
BLAKE2b-256 checksum
How to use checksums
b447be52de2888c74af8083647d0f053c16917264b508e343cc54152cfea3230
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page