Skip to main content

Abstract language model and management command to populate language model

Project description

This is a simple Django apllication that provide an abstract class to create a language model and a management command to populate your model with language titles and their codes.

A ManyToMany relationship to this language model can be useful to define a language field on other models.

Source of the Language codes which are used in this application is:


Install the application package using pip:

pip install django-langlink

add ‘langlink’ to the INSTALLED_APPS list on your settings file

How to use

Import the Language abstract model from langlink and use it to create your language model:

from langlink.models import Language

class MyLanguageModel(Language):

after you create and migrate your models, run this management command to populate the data:

python add_languages my_app_name mylanguagemodel

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django_langlink, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size django_langlink-0.1.2.tar.gz (4.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page