{ "info": { "author": "Ben Roberts", "author_email": "ben@nutrislice.com", "bugtrack_url": null, "classifiers": [ "Framework :: Django", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2" ], "description": "Setup/Usage\n===========\nInstall using `pip install django-threadlocals`\n\nAdd `threadlocals.middleware.ThreadLocalMiddleware` to your `MIDDLEWARE_CLASSES` setting.\nThen use it as follows:\n\nExample usage:\n--------------\n```python\nfrom threadlocals.threadlocals import get_current_request\n\nrequest = get_current_request()\n```\n\n\nCaveat Emptor\n==================\n\nStoring the request in threadlocals goes against several django core developers' strong inclinations against using threadlocals.\nSee [this thread on django-users](https://groups.google.com/forum/?fromgroups=#!topic/django-users/5681nX0YPgQ) for a more in-depth discussion.\nWe recommend you not do this unless you have a really good reason to do so. We feel like we had a really good\nreason (the only one we've come across so far):\nHaving the request in threadlocals is the core piece that allowed us to build a true multi-tenant system on top of django where the site is resolved dynamically based on the current host,\nand objects are filtered based on the current host. With the current version of django, this is nearly impossible to do without the request in threadlocals. This was a very significant and advanced undertaking, but we're happy with the results.\n\n\nTests\n-----\n\nTo run tests:\n\n`python tester/manage.py test`\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/nebstrebor/django-threadlocals", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "django-threadlocals", "package_url": "https://pypi.org/project/django-threadlocals/", "platform": "", "project_url": "https://pypi.org/project/django-threadlocals/", "project_urls": { "Homepage": "https://github.com/nebstrebor/django-threadlocals" }, "release_url": "https://pypi.org/project/django-threadlocals/0.10/", "requires_dist": null, "requires_python": "", "summary": "Contains utils for storing and retreiving values from threadlocals, and middleware for placing the current Django request in threadlocal storage.", "version": "0.10" }, "last_serial": 4765857, "releases": { "0.10": [ { "comment_text": "", "digests": { "md5": "a4bfb06c32a7bc1ff19718d33c4815b6", "sha256": "fd5e2cb36224163a53f326baddfc36251d150466234a16d8f97f54ad92bce89d" }, "downloads": -1, "filename": "django_threadlocals-0.10-py3-none-any.whl", "has_sig": false, "md5_digest": "a4bfb06c32a7bc1ff19718d33c4815b6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6685, "upload_time": "2019-01-31T22:55:59", "url": "https://files.pythonhosted.org/packages/0b/02/181f5c3e8f6da800bc8ee4089a38878842d6f1c65054f0ffc0bd042aad47/django_threadlocals-0.10-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "04f07e2b44922ad885bf38885b97eac7", "sha256": "c06a4c6701a56bcca2acd0bd655aaa136501ab7e5e6327ab7245be629906432a" }, "downloads": -1, "filename": "django-threadlocals-0.10.tar.gz", "has_sig": false, "md5_digest": "04f07e2b44922ad885bf38885b97eac7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5655, "upload_time": "2019-01-31T22:56:00", "url": "https://files.pythonhosted.org/packages/60/b4/8defa1d5de9efa81b75b90baccd8607de1a2abd24c0d25a630d9183a1b6f/django-threadlocals-0.10.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "14d3ed792cacf67a6ccb2845e20be8b8", "sha256": "89132a34b50b644835ca8bce012592e70a0636672ae46b1c2910ff86c766a54a" }, "downloads": -1, "filename": "django-threadlocals-0.2.tar.gz", "has_sig": false, "md5_digest": "14d3ed792cacf67a6ccb2845e20be8b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2718, "upload_time": "2014-12-31T01:54:29", "url": "https://files.pythonhosted.org/packages/bc/1e/a1e951150b0e4fad274eb1cb7698b2c6dda6c407b3dfb6ca09ae9fd13483/django-threadlocals-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "4541e58d01210c041a202ab075a0230d", "sha256": "eeeff4bbad51a283b7cfe71a09eb37469dd95c9141610d0b04332601ebd61560" }, "downloads": -1, "filename": "django-threadlocals-0.3.tar.gz", "has_sig": false, "md5_digest": "4541e58d01210c041a202ab075a0230d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2702, "upload_time": "2014-12-31T02:01:29", "url": "https://files.pythonhosted.org/packages/16/0a/1b4012a944ac2b2ce4ab31a4e2571dc839d33d84587f0087914fa45b4e6a/django-threadlocals-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "9c7a0869b3ec533018a78d0704293f31", "sha256": "c216b18b63c8bd76ee59ac7d0489bfdb532d842b3ce495a8769c50e22d6f7cdf" }, "downloads": -1, "filename": "django-threadlocals-0.4.tar.gz", "has_sig": false, "md5_digest": "9c7a0869b3ec533018a78d0704293f31", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2707, "upload_time": "2014-12-31T02:03:08", "url": "https://files.pythonhosted.org/packages/3f/0a/71b133bb451fa670845d9b1b7555d42409aff0498b4bad3eae1915d15394/django-threadlocals-0.4.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "ab88164e1503b89b9d53c07548d47563", "sha256": "65ca51a516c70b01ff08600dec05161d50b51050018ac23a715e540045bbc624" }, "downloads": -1, "filename": "django-threadlocals-0.4.1.tar.gz", "has_sig": false, "md5_digest": "ab88164e1503b89b9d53c07548d47563", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2730, "upload_time": "2014-12-31T02:11:17", "url": "https://files.pythonhosted.org/packages/61/83/978650e30c64cde1550b3b98dbdd86cfb10fcb5780c01b99ccc5fbff4198/django-threadlocals-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "3efcf13900add1e4fdc71e5d8b4e5d66", "sha256": "732c8b4b450c6c55e979ca6c6d108e868e4e4e045a81ec9051f7b0289ff35609" }, "downloads": -1, "filename": "django-threadlocals-0.4.2.tar.gz", "has_sig": false, "md5_digest": "3efcf13900add1e4fdc71e5d8b4e5d66", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5356, "upload_time": "2014-12-31T02:15:47", "url": "https://files.pythonhosted.org/packages/30/80/08ae2e963a1c690ef673daddae677ae5f316c1273cf2a941508d111339a2/django-threadlocals-0.4.2.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "b3360d4fd94d93c3120e60ba771d084a", "sha256": "bccac14e7bb351f0ffa6eec4aa098745cf8e9fbdd347e1ed529097f2d68b036c" }, "downloads": -1, "filename": "django-threadlocals-0.6.tar.gz", "has_sig": false, "md5_digest": "b3360d4fd94d93c3120e60ba771d084a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4159, "upload_time": "2014-12-31T03:17:18", "url": "https://files.pythonhosted.org/packages/c5/b4/b5303553dd1c5cfc1807fb6e1395d999e3813fa9788323c1b42326eaa4ee/django-threadlocals-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "f028ea766e815cc0fcf1c7371c3deb99", "sha256": "3e279c1749f67dbb3da3d1419f315f3e2a2772c35d8d7fb8bdbf57f1a3661497" }, "downloads": -1, "filename": "django-threadlocals-0.7.tar.gz", "has_sig": false, "md5_digest": "f028ea766e815cc0fcf1c7371c3deb99", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4164, "upload_time": "2014-12-31T06:59:01", "url": "https://files.pythonhosted.org/packages/32/5e/ff407b1ceba6e61fad947fd16ae6b49cc3f3c04b857f980bb09f5b90f461/django-threadlocals-0.7.tar.gz" } ], "0.7.1": [ { "comment_text": "", "digests": { "md5": "e6ef2935d4c0471be12c2b6ed4c15ef5", "sha256": "9a768acc040f15028e87b40a4462dcc0e93770857c7acea354cf250d9787f9b1" }, "downloads": -1, "filename": "django-threadlocals-0.7.1.tar.gz", "has_sig": false, "md5_digest": "e6ef2935d4c0471be12c2b6ed4c15ef5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4173, "upload_time": "2014-12-31T07:00:46", "url": "https://files.pythonhosted.org/packages/08/81/1363e38f46510e877d68db4ec52468a56575fa4fe8a5bba146d0f3156b0c/django-threadlocals-0.7.1.tar.gz" } ], "0.7.2": [ { "comment_text": "", "digests": { "md5": "fcb8b3831f3ec6265851a93329dfa447", "sha256": "18572ff0bae832e73ffd66af2e3c79a7a97906ee3acca06dcfc4127d5d13797c" }, "downloads": -1, "filename": "django-threadlocals-0.7.2.tar.gz", "has_sig": false, "md5_digest": "fcb8b3831f3ec6265851a93329dfa447", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4172, "upload_time": "2015-01-17T03:53:04", "url": "https://files.pythonhosted.org/packages/e6/6e/0fb425ce3977dcf2be9fba7d16e82f76b0c578d866a537c5c27d25d8c6ab/django-threadlocals-0.7.2.tar.gz" } ], "0.8": [ { "comment_text": "", "digests": { "md5": "cb21a6ca148d7f73e3fa842e9bc2131b", "sha256": "6b8c89321fe61fbf2b65503076d2a4545ece4f617e11d66cd0dd4f89f0f44763" }, "downloads": -1, "filename": "django-threadlocals-0.8.tar.gz", "has_sig": false, "md5_digest": "cb21a6ca148d7f73e3fa842e9bc2131b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4177, "upload_time": "2015-09-01T21:17:59", "url": "https://files.pythonhosted.org/packages/b0/c8/dcce21f348c390cae208c2234e2de1b53affb717ff769928e1d5c099fbc8/django-threadlocals-0.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a4bfb06c32a7bc1ff19718d33c4815b6", "sha256": "fd5e2cb36224163a53f326baddfc36251d150466234a16d8f97f54ad92bce89d" }, "downloads": -1, "filename": "django_threadlocals-0.10-py3-none-any.whl", "has_sig": false, "md5_digest": "a4bfb06c32a7bc1ff19718d33c4815b6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6685, "upload_time": "2019-01-31T22:55:59", "url": "https://files.pythonhosted.org/packages/0b/02/181f5c3e8f6da800bc8ee4089a38878842d6f1c65054f0ffc0bd042aad47/django_threadlocals-0.10-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "04f07e2b44922ad885bf38885b97eac7", "sha256": "c06a4c6701a56bcca2acd0bd655aaa136501ab7e5e6327ab7245be629906432a" }, "downloads": -1, "filename": "django-threadlocals-0.10.tar.gz", "has_sig": false, "md5_digest": "04f07e2b44922ad885bf38885b97eac7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5655, "upload_time": "2019-01-31T22:56:00", "url": "https://files.pythonhosted.org/packages/60/b4/8defa1d5de9efa81b75b90baccd8607de1a2abd24c0d25a630d9183a1b6f/django-threadlocals-0.10.tar.gz" } ] }