Skip to main content

django-parlor

Django model translations with even less nasty hacks.

Installation

pip install django-parlor

Usage

from django.contrib import admin
from django.db import models

from parlor.admin import TranslatableAdmin
from parlor.models import TranslatableModel


class MyModel(TranslatableModel):
    ...


class MyModelTranslation(models.Model):
    parent = MyModel.get_parent_field()
    language_code = MyModel.get_language_field()

    label = models.CharField(max_length=32)
    ...

    class Meta:
        unique_together = [('parent', 'language_code')]


admin.site.register(MyModel, TranslatableAdmin)

animal = MyModel.objects.create()
animal.translations.create(language_code='en', label='Frog')
animal.translations.create(language_code='de', label='Frosch')
print(animal.label)

Status

Right now this is more of a proof-of-concept. If people are interested in this library it could certainly be expanded.

Relation to django-parler

Standing on the Shoulders of Giants

There are two popular libraries for model translation in Django: django-modeltranslation and django-parler. The former adds additional columns to the same table while the latter adds a new table for each translatable model. Both of these libraries use a lot of magic which makes them easy to use, but also leads to some hard-to-debug edge cases.

There is also django-translated-fields, which uses the same basic approach as django-modeltranslation, but with much less magic (and much less lines of code).

Here I try to do something similar for django-parler, which has been unmaintained for some time now.

Migration

If you want to migrate from django-parler to django-parlor, you need to replace all instances of parler.TranslatedFields by explicit translation models as described above. Note that the parent field is called master in django-parler.

To keep using the same data, you will also need to set Meta.db_table to the name generated by django-parler (typically myapp_mymodel_translation).

Finally you should run manage.py makemigrations. The generated migrations will only contain minor changes though.

Conceptual differences

  • With django-parlor, the translation model must be created explicitly.
  • In the admin UI, django-parlor uses a stock inline instead of a custom tabbed interface.
  • django-parlor only provides basic attribute access while django-parler provides a lot more features.

Metadata

Release files for django-parlor 0.0.4

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

Source distribution (sdist)

Source distribution for django-parlor 0.0.4
File Size Uploaded
django_parlor-0.0.4.tar.gz 4.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-parlor 0.0.4
File Interpreter ABI Platform
django_parlor-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 9.0 kB

Release files / django_parlor-0.0.4.tar.gz

Download URL django_parlor-0.0.4.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
361877d342d9784103485956a741154912a90069dcdc8806c4392ab26adf8af4
BLAKE2b-256 checksum
How to use checksums
3e9585462ed89768b1c95c197c7ac86c177443726c2114b06281ef4033927a81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 3, 2026.

Transparency log

Release files / django_parlor-0.0.4-py3-none-any.whl

Download URL django_parlor-0.0.4-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db2e713049f0373b904450918f910f2c394ea1ddb6c3b8b211c91c347f55a24f
BLAKE2b-256 checksum
How to use checksums
21b2fd2929f0e0dc8db2c6ab9fcbcf21cea11d48b8cd9416ba0ca3d001dbc59f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 3, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

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