A pluggable django app that provides a comprehensive language and region choices field
Project description
Language and Region Fields for Django apps. Includes all language choices from the IANA Language Subtag Registry.
Included is:
LanguageField, a model field
RegionField, a model field
Installation
pip install django-language-fields
Basic usage
Add languages to the list of the installed apps in your settings.py file:
INSTALLED_APPS = [ ... 'languages', ... ]
Then, you can use it like any regular model field:
from languages.fields import LanguageField, RegionField class MyModel(models.Model): .. language = LanguageField() .. class MyModel(models.Model): .. region = RegionField() ..
Internally, LanguageField and RegionField are based upon CharField and by default represented as strings.
As with CharField’s, it is discouraged to use null=True use blank=True if you want to make it a non-required field.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-language-fields-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d381d9cd94504625ad368fccbe40de2df9acc200b55da0d28183602d31bc423 |
|
MD5 | cef6bc8f7a44df98e52f5e0deeb98c75 |
|
BLAKE2b-256 | cf24ffa4a0664adf1f08390cfd0381b7b91ddde8b3a85ecbc32ad8e37e26cd27 |
Close
Hashes for django_language_fields-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1bec0627c4e5a94172796c796977ea15c6a8c31694ee3945122da1b4cc9fba99 |
|
MD5 | 9aa87ee8eaf37bba86c60edc7accf10d |
|
BLAKE2b-256 | e3e88e2ea77ba813f4de0afcc330492f1dc963baedce6c2ab6bb030cc22b72ce |