{ "info": { "author": "Laura Barluzzi", "author_email": "laura@koalacoder.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.10", "Framework :: Django :: 1.11", "Framework :: Django :: 1.8", "Framework :: Django :: 1.9", "Framework :: Django :: 2.0", "Framework :: Django :: 2.1", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Localization" ], "description": "************************\nUser Language Middleware\n************************\n\n.. image:: https://travis-ci.org/laura-barluzzi/django-user-language-middleware.svg?branch=master\n :target: https://travis-ci.org/laura-barluzzi/django-user-language-middleware\n.. image:: https://img.shields.io/pypi/v/django-user-language-middleware.svg\n :target: https://pypi.python.org/pypi/django-user-language-middleware/\n\nWhat's this?\n============\n\nThis package contains a middleware that activates translations based on the\nlanguage field in the user model. This enables easy user-specific localization\nof a Django application: just add a language string field to the user model,\ninstall this middleware and you're good to go!\n\nUsage\n=====\n\nAdd a language field to your user model:\n\n.. code-block:: python\n\n class User(auth_base.AbstractBaseUser, auth.PermissionsMixin):\n # ...\n language = models.CharField(max_length=10,\n choices=settings.LANGUAGES,\n default=settings.LANGUAGE_CODE)\n\nInstall the middleware from pip:\n\n.. code-block:: sh\n\n pip install django-user-language-middleware\n\nand then add it to your middleware class list to listen to requests:\n\n.. code-block:: python\n\n MIDDLEWARE = [ # Or MIDDLEWARE_CLASSES on Django < 1.10\n ...\n 'user_language_middleware.UserLanguageMiddleware',\n ...\n ]\n\nSupported versions\n==================\n\nPython:\n\n- 2.7\n- 3.4 to 3.6\n\nDjango:\n\n- 1.8 to 1.11\n- 2.0", "description_content_type": "", "docs_url": null, "download_url": "https://pypi.python.org/pypi/django-user-language-middleware", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/laura-barluzzi/django-user-language-middleware", "keywords": "", "license": "Apache Software License", "maintainer": "", "maintainer_email": "", "name": "django-user-language-middleware", "package_url": "https://pypi.org/project/django-user-language-middleware/", "platform": "", "project_url": "https://pypi.org/project/django-user-language-middleware/", "project_urls": { "Download": "https://pypi.python.org/pypi/django-user-language-middleware", "Homepage": "https://github.com/laura-barluzzi/django-user-language-middleware" }, "release_url": "https://pypi.org/project/django-user-language-middleware/0.0.3/", "requires_dist": null, "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "summary": "Django middleware to translate with language in user model", "version": "0.0.3" }, "last_serial": 4392030, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "9a8afbbf6f9bf4be2bda6f133c742b5a", "sha256": "507beea440ec5a29c5683e12b978ece41505b0fa42fdad602ebde07169a3b153" }, "downloads": -1, "filename": "django-user-language-middleware-0.0.1.tar.gz", "has_sig": false, "md5_digest": "9a8afbbf6f9bf4be2bda6f133c742b5a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2660, "upload_time": "2018-04-10T02:44:32", "url": "https://files.pythonhosted.org/packages/02/bb/e304f27e6be722bb38c8303c72836116753b2f7d312aba5da8b4a9dbb04a/django-user-language-middleware-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "112b4e17beb25ff826977f7cb42e10c2", "sha256": "28035e8eec59303cc71b60ce9bffd1b1da48844c82f12dbe8d1dc10f580e1993" }, "downloads": -1, "filename": "django-user-language-middleware-0.0.2.tar.gz", "has_sig": false, "md5_digest": "112b4e17beb25ff826977f7cb42e10c2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2702, "upload_time": "2018-04-10T02:49:03", "url": "https://files.pythonhosted.org/packages/61/bf/76096ca01ec3660670132318371494df5db49f4e28808941dd94e169c380/django-user-language-middleware-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "7d8455d2f07cfa7eec669f2c78a16636", "sha256": "9c73a0d5916aa07810bf32d8b6be4f0b66d5486126ee5b21d1dee638b80763d2" }, "downloads": -1, "filename": "django-user-language-middleware-0.0.3.tar.gz", "has_sig": false, "md5_digest": "7d8455d2f07cfa7eec669f2c78a16636", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 2853, "upload_time": "2018-10-18T21:39:43", "url": "https://files.pythonhosted.org/packages/ad/eb/dcf9926f15e5c6488bbc139c7ef923ba027351a3dfc72f18ac5725a4f586/django-user-language-middleware-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7d8455d2f07cfa7eec669f2c78a16636", "sha256": "9c73a0d5916aa07810bf32d8b6be4f0b66d5486126ee5b21d1dee638b80763d2" }, "downloads": -1, "filename": "django-user-language-middleware-0.0.3.tar.gz", "has_sig": false, "md5_digest": "7d8455d2f07cfa7eec669f2c78a16636", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 2853, "upload_time": "2018-10-18T21:39:43", "url": "https://files.pythonhosted.org/packages/ad/eb/dcf9926f15e5c6488bbc139c7ef923ba027351a3dfc72f18ac5725a4f586/django-user-language-middleware-0.0.3.tar.gz" } ] }