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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f03292ee7c72b0fecd91f3739ea96bc56d28c2170a35c8702f33b752fc0c2eb4 |
|
MD5 | e76e35c9984885ee9ab78cb584e40a4b |
|
BLAKE2b-256 | c700e917dfebcdd32663cbeee46bde477c97aedc981311f19a94bb061ef6b2e5 |
Close
Hashes for django_language_fields-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4129548b78a4c15cc0d12ed21a1d4a403ea56ca3486c319b92a1fbc0cc53f3b8 |
|
MD5 | fd2a086c8ba0c60d2a7c4dcf4c6a7ddb |
|
BLAKE2b-256 | 6701c8a1b377926238f39c820744be9f2bbf8a8de52246f539768ebeb9c03dc9 |