Simple language select as custom template tag
Project description
django_languageselect
Simple language select as custom template tag
Requirements
“django.middleware.locale.LocaleMiddleware” in MIDDLEWARE_CLASSES / MIDDLEWARE
“django.core.context_processors.request” in TEMPLATE_CONTEXT_PROCESSORS / TEMPLATES[‘OPTIONS’][‘context_processors’]
Add ‘django_languageselect’, to INSTALLED_APPS
Usage:
{% load languageselect %} {% languageselect %}
Routes:
The only url provided by this application is “languageselect_index”. Required GET-parameter is “language”, optional GET-parameter is “next”. Next contains the named url to redirect after the language change. This parameter is pre-filled with the current page url. Customization
Feel free to use your own template, just add languageselect/layer.html
Free software: MIT license
Documentation: https://django-languageselect.readthedocs.io.
Tests
Tests will be automatically run by travis on commit to master.
They can also be executed locally using docker-compose by running `docker-compose up`
Requirements upgrades
Check for upgradeable packages by running `docker-compose run --rm python pip-check`
Making a new release
bumpversion is used to manage releases.
Add your changes to the HISTORY and run `docker-compose run --rm python bumpversion <major|minor|patch>`, then push (including tags)
History
2.0.2 (2021-05-05)
Remove setting language in session as this was depreacted since Django 2.x and is broken with Django 3.x
Add tests for Django 3.2
Remove old python 2 and Django compatibility code
2.0.1 (2021-03-25)
Fix documentation syntax
2.0.0 (2021-03-25)
Update packages
Update Docker env
Remove support for Django < 2.2
1.0.0 (2019-11-04)
Update packages
Remove Python 2 support
Add docker container to run tests locally
0.1.6 (2018-01-27)
Add missing folders and modules from package
0.1.5 (2018-01-15)
Add support for python 3 and Django 2, impleneting tests in travis ci
0.1.4 (2017-04-18)
Rename package to django_languageselect (backwards incompatible) to be able to import the module
0.1.3 (2016-06-17)
Fix session key to store language, Django 1.9 compatibility
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
Hashes for django_languageselect-2.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0f680a5a3b9069b575f5d6c32c98d660d8eb9c6ba488d27d2526e843a0b1b01 |
|
MD5 | 7ffc33376d9a95f22b1f4fb971cdcc7f |
|
BLAKE2b-256 | f922f692c94eecd9e9e1169396bd5caf90ffc3b60179496b51e3557ec7e0a611 |
Hashes for django_languageselect-2.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af75f340493a1d5e4911a4088ab828b2e327367479650c8ce6af1d9566183bcc |
|
MD5 | 20a9c6db840eb69930c4fef0c3603bee |
|
BLAKE2b-256 | aaa3f761f3aa5b4059eb1121e93605a2116f851c51dcbc51dbbe43ba902d6818 |