Installing django-parler

Install django-parler via pip using the following command:

pip install django-parler==1.9.2

Edit the settings.py file of your project and add 'parler' to the INSTALLED_APPS setting as follows:

INSTALLED_APPS = [
# ...
'parler',
]

Also add the following code to your settings:

PARLER_LANGUAGES = {
None: (
{'code': 'en'},
{'code': 'es'},
),
'default': {
'fallback': 'en',
'hide_untranslated': False,
}
}

This setting defines the available languages en and es for django-parler. We specify the default language en and we indicate that django-parler should not hide untranslated content.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.94.153