Socket
Book a DemoInstallSign in
Socket

django-language-field

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-language-field

A pluggable django app that provides a comprehensive language choices field

0.0.3
pipPyPI
Maintainers
1

======================== django-language-field

Language Field for Django apps. Includes all language choices from the IANA Language Subtag Registry.

Included is:

  • LanguageField, a model field
  • LanguageField, a form field (Not yet implemented)
  • regenerate.py, a script to parse the latest language list from IANA

Installation

::

pip install django-language-field

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

class MyModel(models.Model):
    ..
    language = LanguageField()
    ..

Internally, LanguageField is based upon CharField and by default represents the as a string.

As with CharField's, it is discouraged to use null=True use blank=True if you want to make it a non-required field.

Keywords

django

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.