# django-modeltrans
[![Travis CI](https://travis-ci.org/zostera/django-modeltrans.svg?branch=master)](https://travis-ci.org/zostera/django-modeltrans)
[![Documentation Status](https://readthedocs.org/projects/django-modeltrans/badge/?version=latest)](http://django-modeltrans.readthedocs.io/en/latest/?badge=latest)
[![Any color you like](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
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](https://pypi.python.org/pypi/django-modeltrans)
- [Documentation](http://django-modeltrans.readthedocs.io/en/latest/)
# 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
- [PostgreSQL jsonb functions](https://www.postgresql.org/docs/9.5/static/functions-json.html)
Raw data
{
"_id": null,
"home_page": "https://github.com/zostera/django-modeltrans/",
"name": "django-modeltrans",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Jan Pieter Waagmeester",
"author_email": "jieter@zostera.nl",
"download_url": "https://files.pythonhosted.org/packages/f3/45/2d0fe2b493b5476897e1f1a46a4de94278d77db80e6d94c83227ca2f9702/django-modeltrans-0.7.5.tar.gz",
"platform": null,
"description": "# django-modeltrans\n\n[![Travis CI](https://travis-ci.org/zostera/django-modeltrans.svg?branch=master)](https://travis-ci.org/zostera/django-modeltrans)\n[![Documentation Status](https://readthedocs.org/projects/django-modeltrans/badge/?version=latest)](http://django-modeltrans.readthedocs.io/en/latest/?badge=latest)\n[![Any color you like](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n\nTranslates Django model fields in a `JSONField` using a registration approach.\n\n# Features/requirements\n\n- Uses one PostgreSQL `jsonb`-field per model.\n (`django.contrib.postgres.JSONField` for Django<3.1, `django.db.models.JSONField` for Django>=3.1)\n- Django 2.2, 3.0, 3.1, 3.2, 4.0 (with their supported python versions)\n- PostgreSQL >= 9.5 and Psycopg2 >= 2.5.4.\n- [Available on pypi](https://pypi.python.org/pypi/django-modeltrans)\n- [Documentation](http://django-modeltrans.readthedocs.io/en/latest/)\n\n# Running the tests\n\n`tox`\n\nRunning the tests only for the current environment, use `make test`\n\n# Attribution\n\nSome concepts and code come from https://github.com/deschler/django-modeltranslation,\nwhich is in turn inspired by https://github.com/zmathew/django-linguo\n\nWe started this solution at Zostera because we did not like:\n - The way django-modeltranslation adds one field per language (and thus requires a migration\nwhen adding a language);\n - The unpredictability of the original field.\n\nSince `JSONB` is supported by Postgres now, we developed this approach.\n\n# Relevant 3rd party documentation\n\n- [PostgreSQL jsonb functions](https://www.postgresql.org/docs/9.5/static/functions-json.html)\n",
"bugtrack_url": null,
"license": "Simplified BSD",
"summary": "Model translations in a jsonb field",
"version": "0.7.5",
"project_urls": {
"Homepage": "https://github.com/zostera/django-modeltrans/"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f3452d0fe2b493b5476897e1f1a46a4de94278d77db80e6d94c83227ca2f9702",
"md5": "29f7570b1bd831676a55114af7726ad3",
"sha256": "3ea948537428ed79ed244ff4cffb342cad52de5cfd1ea66e758adbb27a1adfdf"
},
"downloads": -1,
"filename": "django-modeltrans-0.7.5.tar.gz",
"has_sig": false,
"md5_digest": "29f7570b1bd831676a55114af7726ad3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 31206,
"upload_time": "2023-08-03T12:13:52",
"upload_time_iso_8601": "2023-08-03T12:13:52.882426Z",
"url": "https://files.pythonhosted.org/packages/f3/45/2d0fe2b493b5476897e1f1a46a4de94278d77db80e6d94c83227ca2f9702/django-modeltrans-0.7.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-03 12:13:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "zostera",
"github_project": "django-modeltrans",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"tox": true,
"lcname": "django-modeltrans"
}