Skip to main content

django-modeltrans

Travis CI Documentation Status Any color you like

Translates Django model fields in a JSONField using a registration approach.

Features/requirements

  • Uses one PostgreSQL jsonb-field per model. (django.contrib.postgres.JSONField for Django<3.1, django.db.models.JSONField for Django>=3.1)
  • Django 2.2, 3.0, 3.1, 3.2, 4.0 (with their supported python versions)
  • PostgreSQL >= 9.5 and Psycopg2 >= 2.5.4.
  • Available on pypi
  • Documentation

Running the tests

tox

Running the tests only for the current environment, use make test

Attribution

Some concepts and code come from https://github.com/deschler/django-modeltranslation, which is in turn inspired by https://github.com/zmathew/django-linguo

We started this solution at Zostera because we did not like:

  • The way django-modeltranslation adds one field per language (and thus requires a migration when adding a language);
  • The unpredictability of the original field.

Since JSONB is supported by Postgres now, we developed this approach.

Relevant 3rd party documentation

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-modeltrans-0.7.2.tar.gz (31.2 kB view details)

Uploaded Source

File details

Details for the file django-modeltrans-0.7.2.tar.gz.

File metadata

  • Download URL: django-modeltrans-0.7.2.tar.gz
  • Upload date:
  • Size: 31.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.2

File hashes

Hashes for django-modeltrans-0.7.2.tar.gz
Algorithm Hash digest
SHA256 274e12ec50f03d273c013d4625af61b6dd8c84dfc0ed029ac89ac62349e3315a
MD5 c8352ba86c840ba58f889ee80cd53809
BLAKE2b-256 d614d365415d39fd6708bf26072f502dcbe8408c2d981475ba017b0abe470560

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page