I18nFields for Django
=====================
.. image:: https://img.shields.io/pypi/v/django-i18nfield.svg
:target: https://pypi.python.org/pypi/django-i18nfield
.. image:: https://readthedocs.org/projects/django-i18nfield/badge/?version=latest
:target: https://django-i18nfield.readthedocs.io/
.. image:: https://travis-ci.org/raphaelm/django-i18nfield.svg?branch=master
:target: https://travis-ci.org/raphaelm/django-i18nfield
.. image:: https://codecov.io/gh/raphaelm/django-i18nfield/branch/master/graph/badge.svg
:target: https://codecov.io/gh/raphaelm/django-i18nfield
This is yet another way to store multi-lingual content in Django_. In contrast to other options
like `django-hvad`_, `django-modeltranslation`_ or `django-parler`_ it does not require additonal
database tables and you can reconfigure the available languages without any changes to the database
schema. In constrast to `nece`_, it is not specific to PostgreSQL.
How does it work then? It stores JSON data into a ``TextField``. Yes, this is kinda dirty and violates
the `1NF`_. This makes it harder for non-django based programs to interact directly with your database
and is not perfectly efficient in terms of storage space.
It also lacks the ability to do useful lookups, searches and indices on internationalized fields.
If one of those things are important to you, **this project is not for you**, please choose one of the
ones that we linked above.
However if those limitations are fine for you, this provides you with a very lightweight, easy to use and
flexible solution. This approach has been in use in `pretix`_ for quite a while, so it has been tested in
production. The package contains not only the model fields, but also form fields and everything you need
to get them running.
Features
--------
* Very easy installation
* Internationalized versions of ``CharField`` and ``TextField`` types
* Integrated form fields types and widgets
* Automatic migration from non-localized fields with a simple migration
* Full support for forms and formsets
* Possibility to dynamically limit the displayed languages
* Very basic integration with django admin
* Integration with Django Restframework
* Comprehensive test suite and production-tested
Tested with:
* Python 3.6 to 3.10
* Django 3.2 to 4.0
License
-------
The code in this repository is published under the terms of the Apache License.
See the LICENSE file for the complete license text.
This project is maintained by Raphael Michel <mail@raphaelmichel.de>. See the
AUTHORS file for a list of all the awesome folks who contributed to this project.
.. _pretix: https://github.com/pretix/pretix
.. _django: https://www.djangoproject.com/
.. _django-hvad: https://github.com/KristianOellegaard/django-hvad
.. _django-modeltranslation: https://github.com/deschler/django-modeltranslation
.. _django-parler: https://github.com/django-parler/django-parler
.. _nece: https://pypi.python.org/pypi/nece
.. _1NF: https://en.wikipedia.org/wiki/First_normal_form
Raw data
{
"_id": null,
"home_page": "https://github.com/raphaelm/django-i18nfield",
"name": "django-i18nfield",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "i18n strings database models",
"author": "Raphael Michel",
"author_email": "mail@raphaelmichel.de",
"download_url": "https://files.pythonhosted.org/packages/f5/ed/d7ad1d3ae736d4e06ff16a129a9a0d17ca4a37d3362be1bb913467464d55/django_i18nfield-1.10.2.tar.gz",
"platform": null,
"description": "I18nFields for Django\n=====================\n\n.. image:: https://img.shields.io/pypi/v/django-i18nfield.svg\n :target: https://pypi.python.org/pypi/django-i18nfield\n\n.. image:: https://readthedocs.org/projects/django-i18nfield/badge/?version=latest\n :target: https://django-i18nfield.readthedocs.io/\n\n.. image:: https://travis-ci.org/raphaelm/django-i18nfield.svg?branch=master\n :target: https://travis-ci.org/raphaelm/django-i18nfield\n\n.. image:: https://codecov.io/gh/raphaelm/django-i18nfield/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/raphaelm/django-i18nfield\n\n\nThis is yet another way to store multi-lingual content in Django_. In contrast to other options\nlike `django-hvad`_, `django-modeltranslation`_ or `django-parler`_ it does not require additonal\ndatabase tables and you can reconfigure the available languages without any changes to the database\nschema. In constrast to `nece`_, it is not specific to PostgreSQL.\n\nHow does it work then? It stores JSON data into a ``TextField``. Yes, this is kinda dirty and violates\nthe `1NF`_. This makes it harder for non-django based programs to interact directly with your database\nand is not perfectly efficient in terms of storage space.\nIt also lacks the ability to do useful lookups, searches and indices on internationalized fields.\nIf one of those things are important to you, **this project is not for you**, please choose one of the\nones that we linked above.\n\nHowever if those limitations are fine for you, this provides you with a very lightweight, easy to use and\nflexible solution. This approach has been in use in `pretix`_ for quite a while, so it has been tested in\nproduction. The package contains not only the model fields, but also form fields and everything you need\nto get them running.\n\nFeatures\n--------\n\n* Very easy installation\n* Internationalized versions of ``CharField`` and ``TextField`` types\n* Integrated form fields types and widgets\n* Automatic migration from non-localized fields with a simple migration\n* Full support for forms and formsets\n* Possibility to dynamically limit the displayed languages\n* Very basic integration with django admin\n* Integration with Django Restframework\n* Comprehensive test suite and production-tested\n\nTested with:\n\n* Python 3.6 to 3.10\n* Django 3.2 to 4.0\n\nLicense\n-------\nThe code in this repository is published under the terms of the Apache License. \nSee the LICENSE file for the complete license text.\n\nThis project is maintained by Raphael Michel <mail@raphaelmichel.de>. See the\nAUTHORS file for a list of all the awesome folks who contributed to this project.\n\n.. _pretix: https://github.com/pretix/pretix\n.. _django: https://www.djangoproject.com/\n.. _django-hvad: https://github.com/KristianOellegaard/django-hvad\n.. _django-modeltranslation: https://github.com/deschler/django-modeltranslation\n.. _django-parler: https://github.com/django-parler/django-parler\n.. _nece: https://pypi.python.org/pypi/nece\n.. _1NF: https://en.wikipedia.org/wiki/First_normal_form\n",
"bugtrack_url": null,
"license": "Apache License 2.0",
"summary": "Store internationalized strings in Django models",
"version": "1.10.2",
"project_urls": {
"Homepage": "https://github.com/raphaelm/django-i18nfield"
},
"split_keywords": [
"i18n",
"strings",
"database",
"models"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a9124738cea9fc254f6cc52093d4dd27ec98a4abf6bd1866518723d85a81a144",
"md5": "02838255f831b4893c805746aa13d54b",
"sha256": "524382b366cdbfc24f47a5b4871a5676e93a5b18a35484b78eb09dd7a6cf1ff6"
},
"downloads": -1,
"filename": "django_i18nfield-1.10.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "02838255f831b4893c805746aa13d54b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 15028,
"upload_time": "2024-12-16T12:53:42",
"upload_time_iso_8601": "2024-12-16T12:53:42.611435Z",
"url": "https://files.pythonhosted.org/packages/a9/12/4738cea9fc254f6cc52093d4dd27ec98a4abf6bd1866518723d85a81a144/django_i18nfield-1.10.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f5edd7ad1d3ae736d4e06ff16a129a9a0d17ca4a37d3362be1bb913467464d55",
"md5": "a120a137354c5944e9c3a9817c53688d",
"sha256": "8b946afa9bb306ca0f01b71b9c8c70b3b2450d66de82d00caea6bd492e27c1f2"
},
"downloads": -1,
"filename": "django_i18nfield-1.10.2.tar.gz",
"has_sig": false,
"md5_digest": "a120a137354c5944e9c3a9817c53688d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 16236,
"upload_time": "2024-12-16T12:53:46",
"upload_time_iso_8601": "2024-12-16T12:53:46.759960Z",
"url": "https://files.pythonhosted.org/packages/f5/ed/d7ad1d3ae736d4e06ff16a129a9a0d17ca4a37d3362be1bb913467464d55/django_i18nfield-1.10.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-16 12:53:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "raphaelm",
"github_project": "django-i18nfield",
"travis_ci": true,
"coveralls": true,
"github_actions": false,
"tox": true,
"lcname": "django-i18nfield"
}