Skip to main content

I18nFields for Django

https://img.shields.io/pypi/v/django-i18nfield.svg https://readthedocs.org/projects/django-i18nfield/badge/?version=latest https://travis-ci.org/raphaelm/django-i18nfield.svg?branch=master https://codecov.io/gh/raphaelm/django-i18nfield/branch/master/graph/badge.svg

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.9 to 3.13

  • Django supported versions: 4.2, 5.1 and 5.2

Security

If you discover a security issue, please contact us at security@pretix.eu and see our Responsible Disclosure Policy further information.

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.

Metadata

Release files for django-i18nfield 1.12.0

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-i18nfield 1.12.0
File Size Uploaded Provenance Actions
django_i18nfield-1.12.0.tar.gz 17.3 kB Without provenance Details for django_i18nfield-1.12.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-i18nfield 1.12.0
File Interpreter ABI Platform Actions
django_i18nfield-1.12.0-py3-none-any.whl Python 3 none any Details for django_i18nfield-1.12.0-py3-none-any.whl

Total release size: 33.0 kB

Release files / django_i18nfield-1.12.0.tar.gz

Download URL django_i18nfield-1.12.0.tar.gz
Size 17.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a40cfa67ea066bf42bafb6794dceb9d8c32dd9b6f599427a9bd3934ced44882a
BLAKE2b-256 checksum
How to use checksums
46bcec665977e0758728a7f9baaefa13fb1c7320945fab6c0df67091288c4ff1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / django_i18nfield-1.12.0-py3-none-any.whl

Download URL django_i18nfield-1.12.0-py3-none-any.whl
Size 15.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
33dc17974f764c5cae6b28ed2bab82562b401e113753ffc8712a2f9c78a3a48b
BLAKE2b-256 checksum
How to use checksums
23da335e958b6efee753ce487d3649dc8db23aab38943a168a807b340f1eaac1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for django-i18nfield 1.12.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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