معرفی شرکت ها


django-crequest-2018.5.11


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

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

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

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

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

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

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

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

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

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

مشاهده بیشتر

توضیحات

Middleware that makes the current request available from anywhere.
ویژگی مقدار
سیستم عامل -
نام فایل django-crequest-2018.5.11
نام django-crequest
نسخه کتابخانه 2018.5.11
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Alireza Savand
ایمیل نویسنده alireza.savand@gmail.com
آدرس صفحه اصلی https://github.com/Alir3z4/django-crequest
آدرس اینترنتی https://pypi.org/project/django-crequest/
مجوز Copyright (c) 2012-2018 Alireza Savand All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the authors nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=============== django-crequest =============== .. contents:: Overview ======== - ``crequest`` takes care of current ``request`` in silent way. - ``crequest`` will bring you current ``request`` object of your Django application from anywhere in your code. Installing ========== ``django-crequest`` is available on http://pypi.python.org/pypi/django-crequest So it can be installed it by pip:: $ python pip install django-crequest Or you can grab the latest version tarball and :: $ python setup.py install To enable ``django-crequest`` in your project * Add ``crequest`` to *INSTALLED_APPS* in your **settings.py** * Add ``crequest.middleware.CrequestMiddleware`` to ``MIDDLEWARE_CLASSES`` after the authentication and session middleware. Supported Python versions ========================= ``django-crequest`` currently can be run on multiple python versions: * Python 2 * Python 3 * PyPy How to use ========== First import the crequest's middleware:: from crequest.middleware import CrequestMiddleware Get the current ``request`` ;):: current_request = CrequestMiddleware.get_request() Done. In depth & Complex details ========================== Set the current request in UnKnown situations:: CrequestMiddleware.set_request(request) Return *iam_request* if there is no current request:: CrequestMiddleware.get_request(iam_request) And finally delete:: CrequestMiddleware.del_request() The middleware automatically sets/deletes the current request for HTTP requests. For other uses (management commands, scripts), you will need to do this yourself.


نحوه نصب


نصب پکیج whl django-crequest-2018.5.11:

    pip install django-crequest-2018.5.11.whl


نصب پکیج tar.gz django-crequest-2018.5.11:

    pip install django-crequest-2018.5.11.tar.gz