معرفی شرکت ها


django-threadlocals-0.8


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Contains utils for storing and retreiving values from threadlocals, and middleware for placing the current Django request in threadlocal storage.
ویژگی مقدار
سیستم عامل -
نام فایل django-threadlocals-0.8
نام django-threadlocals
نسخه کتابخانه 0.8
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Ben Roberts
ایمیل نویسنده ben@nutrislice.com
آدرس صفحه اصلی https://github.com/nebstrebor/django-threadlocals
آدرس اینترنتی https://pypi.org/project/django-threadlocals/
مجوز -
Setup/Usage =========== Install using `pip install django-threadlocals` Add `threadlocals.middleware.ThreadLocalMiddleware` to your `MIDDLEWARE_CLASSES` setting. Then use it as follows: Example usage: -------------- ```python from threadlocals.threadlocals import get_current_request request = get_current_request() ``` Caveat Emptor ================== Storing the request in threadlocals goes against several django core developers' strong inclinations against using threadlocals. See [this thread on django-users](https://groups.google.com/forum/?fromgroups=#!topic/django-users/5681nX0YPgQ) for a more in-depth discussion. We recommend you not do this unless you have a really good reason to do so. We feel like we had a really good reason (the only one we've come across so far): Having 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, and 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. Tests ----- To run tests: `python tester/manage.py test`


نحوه نصب


نصب پکیج whl django-threadlocals-0.8:

    pip install django-threadlocals-0.8.whl


نصب پکیج tar.gz django-threadlocals-0.8:

    pip install django-threadlocals-0.8.tar.gz