Skip to main content

Utilities for localized Django projects

Project description

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

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

Project details


Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page