معرفی شرکت ها


django-request-context-0.1.0


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

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

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

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

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

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

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

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

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

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

مشاهده بیشتر

توضیحات

Django middleware which provide request and g objectall of which are accessible everywhere, and thread isolation, just like used in flask.
ویژگی مقدار
سیستم عامل -
نام فایل django-request-context-0.1.0
نام django-request-context
نسخه کتابخانه 0.1.0
نگهدارنده []
ایمیل نگهدارنده []
نویسنده wujinjing
ایمیل نویسنده schecterfirst@gmail.com
آدرس صفحه اصلی https://github.com/schecterdamien/django-request-context
آدرس اینترنتی https://pypi.org/project/django-request-context/
مجوز MIT
# django-request-context Django middleware which provide request and g object. all of which are accessible everywhere, and thread isolation, just like used in flask. ## Installing Install and update using pip: ``` pip install django-request-context ``` ## Usage 1. Add RequestContextMiddleware to MIDDLEWARE in settings.py ``` import django_request_context MIDDLEWARE = [ ... 'django_request_context.RequestContextMiddleware', ... ] ``` 2. You can get request and g objects anywhere in the project throughout the life cycle of the request. just import: ``` from django_request_context import request, g ``` ## why do you need this? when your django project is big enough and the function call stack is deep. if your want to get request object in the bottom of the call stack, you need to transfer request as parameters layer-by-layer, this can help you get request directly. the request you import from django-request-context is **readonly** object, if your want to convey some message you can user g object, this is a **writeable** object. the behavior of the request and g objects is exactly the same as in the flask.


زبان مورد نیاز

مقدار نام
>=3.4.1 Python


نحوه نصب


نصب پکیج whl django-request-context-0.1.0:

    pip install django-request-context-0.1.0.whl


نصب پکیج tar.gz django-request-context-0.1.0:

    pip install django-request-context-0.1.0.tar.gz