Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

zostera/django-modeltrans

Open more actions menu

Repository files navigation

django-modeltrans

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 (via django.db.models.JSONField)
  • Django 4.2, 5.0 (with their supported python versions)
  • PostgreSQL >= 13 and the appropriate psycopg version for your Django version
  • 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

About

Translate Django model fields in a PostgreSQL JSONField

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 12

Morty Proxy This is a proxified and sanitized view of the page, visit original site.