{ "info": { "author": "zencore", "author_email": "appstore@zencore.cn", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "DJANGO MIDDLEWARE GLOBAL REQUEST\n================================\n\n.. image:: https://travis-ci.org/appstore-zencore/django-middleware-global-request.svg?branch=master\n :target: https://travis-ci.org/appstore-zencore/django-middleware-global-request\n\n\nDjango middleware that keep request instance for every thread.\n\nInstall\n-------\n\n::\n\n pip install django-middleware-global-request\n\nUsage\n------\n\n1. Add django application django_global_request to INSTALLED_APPS in settings.py\n\n::\n\n INSTALLED_APPS = [\n ...\n 'django_global_request',\n ...\n ]\n\n2. Add GlobalRequestMiddleware to MIDDLEWARE in settings.py\n\n::\n\n MIDDLEWARE = [\n ...\n 'django_global_request.middleware.GlobalRequestMiddleware',\n ...\n ]\n\n3. Get request instance with function **get_request** from django_global_request.middleware\n\n::\n\n from django_global_request.middleware import get_request\n\n class TestModel(models.Model):\n\n field1 = models.CharField(max_length=32)\n\n def hello(self):\n request = get_request()\n ...\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/appstore-zencore/django-middleware-global-request", "keywords": "django-middleware-global-request", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-middleware-global-request", "package_url": "https://pypi.org/project/django-middleware-global-request/", "platform": "", "project_url": "https://pypi.org/project/django-middleware-global-request/", "project_urls": { "Homepage": "https://github.com/appstore-zencore/django-middleware-global-request" }, "release_url": "https://pypi.org/project/django-middleware-global-request/0.1.2/", "requires_dist": null, "requires_python": "", "summary": "Django middleware that keep request instance for every thread.", "version": "0.1.2" }, "last_serial": 5109551, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "9d3b297525d32a78dab27bf1f7f1e56e", "sha256": "2940069b35147bcc9631c0cb8624a77429cb119d95b8944022b67bc642996c75" }, "downloads": -1, "filename": "django-middleware-global-request-0.1.0.tar.gz", "has_sig": false, "md5_digest": "9d3b297525d32a78dab27bf1f7f1e56e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2263, "upload_time": "2017-12-28T06:16:39", "url": "https://files.pythonhosted.org/packages/1c/fc/2404e36717737bc8141a0e792b708ca79fcbfd0563e18931231aab90d6f8/django-middleware-global-request-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "49bb63589e451ac412572bd1f2c3a121", "sha256": "04e56a646262de77d329171494e6e744bcaa10847696b356843c103644a233e0" }, "downloads": -1, "filename": "django-middleware-global-request-0.1.1.tar.gz", "has_sig": false, "md5_digest": "49bb63589e451ac412572bd1f2c3a121", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2328, "upload_time": "2018-02-28T02:55:46", "url": "https://files.pythonhosted.org/packages/86/17/d282da88c39609d03ee0a92e27c8c8e7767ca7a07a2b3e9845d09931f382/django-middleware-global-request-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "6f92e5c22e92f4e4fa09305bf565855b", "sha256": "f6490759bc9f7dbde4001709554e29ca715daf847f2222914b4e47117dca9313" }, "downloads": -1, "filename": "django-middleware-global-request-0.1.2.tar.gz", "has_sig": false, "md5_digest": "6f92e5c22e92f4e4fa09305bf565855b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2386, "upload_time": "2019-04-07T10:25:42", "url": "https://files.pythonhosted.org/packages/d4/e0/2a8ec5553ce771fd2e400f845d3bba9ddfe283f7a5b9d7d1f6880ef613c0/django-middleware-global-request-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6f92e5c22e92f4e4fa09305bf565855b", "sha256": "f6490759bc9f7dbde4001709554e29ca715daf847f2222914b4e47117dca9313" }, "downloads": -1, "filename": "django-middleware-global-request-0.1.2.tar.gz", "has_sig": false, "md5_digest": "6f92e5c22e92f4e4fa09305bf565855b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2386, "upload_time": "2019-04-07T10:25:42", "url": "https://files.pythonhosted.org/packages/d4/e0/2a8ec5553ce771fd2e400f845d3bba9ddfe283f7a5b9d7d1f6880ef613c0/django-middleware-global-request-0.1.2.tar.gz" } ] }