This project has been archived by its maintainers, and is no longer receiving any updates.
Django Language Preference Middleware
This repo contains basic middleware that retrieves a user’s language preference and sets it on the request session.
Usage
Subclass LanguagePreferenceMiddleware and override the get_user_language_preference method.
Your new middleware should be tested by including LangPrefMiddlewareTestCaseMixin in your test case and overriding the middleware_class, get_user, and set_user_language_preference attributes.
Testing
$ make validate
How to Contribute
Contributions are very welcome, but for legal reasons, you must submit a signed [individual contributor’s agreement](http://code.edx.org/individual-contributor-agreement.pdf) before we can accept your contribution. See our [CONTRIBUTING](https://github.com/openedx/.github/blob/master/CONTRIBUTING.md) file for more information – it also contains guidelines for how to maintain high code quality, which will make your contribution more likely to be accepted.
Metadata
Release files for django-lang-pref-middleware 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-lang-pref-middleware-1.3.0.tar.gz | 8.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_lang_pref_middleware-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.2 kB
Release files / django-lang-pref-middleware-1.3.0.tar.gz
| Download URL | django-lang-pref-middleware-1.3.0.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d854af66c291a0d210a9b9aa1aff46bfedfacc2bfbdb17c2c552dac1d7287685
|
|
BLAKE2b-256 checksum How to use checksums |
67ed3afdcb38341890c97745913d63290f542c5eb7d986a83a9527b19c425e1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / django_lang_pref_middleware-1.3.0-py3-none-any.whl
| Download URL | django_lang_pref_middleware-1.3.0-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0351d3c2ee43a8caf32f40c1b49c3cb0cf51aa76043582fb70ea1f6e85fc9328
|
|
BLAKE2b-256 checksum How to use checksums |
5271abe64fb93cb1a761212c8c35762d6179d9ffbf2b01b5828ef83d74c4a9f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|