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.
Raw data
{
"_id": null,
"home_page": "https://github.com/openedx/django-lang-pref-middleware",
"name": "django-lang-pref-middleware",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "edX",
"author_email": "oscm@edx.org",
"download_url": "https://files.pythonhosted.org/packages/67/ed/3afdcb38341890c97745913d63290f542c5eb7d986a83a9527b19c425e1b/django-lang-pref-middleware-1.3.0.tar.gz",
"platform": null,
"description": "Django Language Preference Middleware\n=====================================\n\nThis repo contains basic middleware that retrieves a user's language \npreference and sets it on the request session.\n\nUsage\n=====\nSubclass `LanguagePreferenceMiddleware` and override the\n`get_user_language_preference` method.\n\nYour new middleware should be\ntested by including `LangPrefMiddlewareTestCaseMixin` in your test case and\noverriding the `middleware_class`, `get_user`, and \n`set_user_language_preference` attributes.\n\nTesting\n=======\n\n $ make validate\n\n\nHow to Contribute\n-----------------\n\nContributions are very welcome, but for legal reasons, you must submit a signed\n[individual contributor's agreement](http://code.edx.org/individual-contributor-agreement.pdf)\nbefore we can accept your contribution. See our\n[CONTRIBUTING](https://github.com/openedx/.github/blob/master/CONTRIBUTING.md)\nfile for more information -- it also contains guidelines for how to maintain\nhigh code quality, which will make your contribution more likely to be accepted.\n",
"bugtrack_url": null,
"license": "",
"summary": "Django middleware for setting the user's language preference at request time.",
"version": "1.3.0",
"project_urls": {
"Homepage": "https://github.com/openedx/django-lang-pref-middleware"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5271abe64fb93cb1a761212c8c35762d6179d9ffbf2b01b5828ef83d74c4a9f2",
"md5": "28e78e471c7b71c7b1269be76fbcc8e3",
"sha256": "0351d3c2ee43a8caf32f40c1b49c3cb0cf51aa76043582fb70ea1f6e85fc9328"
},
"downloads": -1,
"filename": "django_lang_pref_middleware-1.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "28e78e471c7b71c7b1269be76fbcc8e3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 8462,
"upload_time": "2023-07-21T13:41:06",
"upload_time_iso_8601": "2023-07-21T13:41:06.286204Z",
"url": "https://files.pythonhosted.org/packages/52/71/abe64fb93cb1a761212c8c35762d6179d9ffbf2b01b5828ef83d74c4a9f2/django_lang_pref_middleware-1.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "67ed3afdcb38341890c97745913d63290f542c5eb7d986a83a9527b19c425e1b",
"md5": "20c5dd2fe9f22849eb7b5eb4b8ba239c",
"sha256": "d854af66c291a0d210a9b9aa1aff46bfedfacc2bfbdb17c2c552dac1d7287685"
},
"downloads": -1,
"filename": "django-lang-pref-middleware-1.3.0.tar.gz",
"has_sig": false,
"md5_digest": "20c5dd2fe9f22849eb7b5eb4b8ba239c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8774,
"upload_time": "2023-07-21T13:41:07",
"upload_time_iso_8601": "2023-07-21T13:41:07.816808Z",
"url": "https://files.pythonhosted.org/packages/67/ed/3afdcb38341890c97745913d63290f542c5eb7d986a83a9527b19c425e1b/django-lang-pref-middleware-1.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-21 13:41:07",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "openedx",
"github_project": "django-lang-pref-middleware",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "django-lang-pref-middleware"
}