Data Processing
clean_unicode
utils.clean_unicode accepts an input string and returns normalized Unicode
UnicodeNormalizerMixin
Model mixin class which ensures that every text field has been processed with clean_unicode during model validation’s clean_fields step
Testing
TranslationSafeTestClient
Django TestClient subclass which resets the active translation after each request to avoid leaking translation state across tests, causing hard-to-debug side-effects like loading fixtures in the wrong language using django-modeltranslation.
Usage:
from django_i18n_utils.testclients import TranslationSafeTestClient
class MyTestCase(TestCase):
client_class = TranslationSafeTestClient
def test_foo(self):
# default language active
self.client.get('/pt/myview') # Portuguese active when the view executes
# default language active again
TranslationSafeTestCase
Django TestCase subclass which uses TranslationSafeTestClient to avoid test failures caused by previous tests leaving an unexpected locale active.
Usage:
from django_i18n_utils.testcases import TranslationSafeTestCase
class MyTestCase(TranslationSafeTestCase):
…
LocalizedTestCase
Django TestCase subclass which makes it easy to create per-language tests without duplication or for-loops:
class MyLocalizedTests(LocalizedTestCase):
def test_homepage(self):
…
will execute and display as if you had really created this:
class MyLocalizedTests(LocalizedTestCase):
def test_homepage_en(self):
… # test English
def test_homepage_es(self):
… # test Spanish
Metadata
Release files for django-i18n-utils 1.5.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-i18n-utils-1.5.3.tar.gz | 4.9 kB | Without provenance | Details for django-i18n-utils-1.5.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_i18n_utils-1.5.3-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for django_i18n_utils-1.5.3-py2.py3-none-any.whl |
Total release size: 13.5 kB
Release files / django-i18n-utils-1.5.3.tar.gz
| Download URL | django-i18n-utils-1.5.3.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
295687910d40333fe271bd8cf3d5b1619ac785e6d5da362e204c46bf225ada0c
|
|
BLAKE2b-256 checksum How to use checksums |
31ad1907521f51098cc3ff5e00145b87f3d3a5777484058c864f13d093ce2779
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django_i18n_utils-1.5.3-py2.py3-none-any.whl
| Download URL | django_i18n_utils-1.5.3-py2.py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a8ed0c804898e9fb219f5461b47aa3d17e2f2cbfa4717b10eadc11599c86135a
|
|
BLAKE2b-256 checksum How to use checksums |
7048e28e5a108053f489cdfc5b87b76b577a229d5e4e8c230bdd15ec4de5b7c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-i18n-utils 1.5.3
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.