معرفی شرکت ها


emulaterest-0.2


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

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

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

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

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

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

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

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

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

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

مشاهده بیشتر

توضیحات

WSGI middleware that does Rails style PUT and DELETE request emulation
ویژگی مقدار
سیستم عامل -
نام فایل emulaterest-0.2
نام emulaterest
نسخه کتابخانه 0.2
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Andras Biczo
ایمیل نویسنده abiczo@gmail.com
آدرس صفحه اصلی http://github.com/abiczo/emulaterest
آدرس اینترنتی https://pypi.org/project/emulaterest/
مجوز MIT
=========== EmulateRest =========== WSGI middleware that does Rails style PUT and DELETE request emulation. The middleware intercepts the wrapped application's response and looks for forms with ``method="PUT"`` or ``method="DELETE"``. For each such form it replaces the value of ``method`` with "POST" and adds a hidden input field ``_method`` that contains the original request method. It also intercepts incoming requests and does the inverse transformation. What this all means is that you can use PUT and DELETE forms in your HTML code, without having to worry about browser support for these request methods. Install ======= You can install EmulateRest from `PyPI <http://pypi.python.org/pypi>`_:: easy_install emulaterest or you can install the latest version from the `github repository <http://github.com/abiczo/emulaterest>`_:: git clone git://github.com/abiczo/emulaterest.git cd emulaterest python setup.py install Notes ===== * For ``text/html`` documents the default behavior is to inject HTML style ``<input>`` elements. You can tell EmulateRest to inject XHTML style ``<input/>`` elements either by using the ``force_xhtml`` option or by serving your documents as ``application/xhtml+xml``. * If you are using a gzipping middleware or any other middleware that modifies the content-encoding, make sure that EmulateRest is wrapped in that middleware and not the other way round. Example ======= A complete working example using `web.py <http://webpy.org>`_:: import web urls = ('/', 'index') class index: def GET(self): web.ctx['headers'].append(('Content-Type', 'text/html')) return """<html><head><title>PUT test</title></head><body><div> <form method="PUT" action="/"> <div> <input type="text" name="inp" value="value"> <input type="submit" value="Submit"> </div> </form> </div></body></html> """ def PUT(self): return 'PUT ' + str(web.input()) if __name__ == '__main__': import emulaterest app = web.application(urls, globals()) app.run(emulaterest.EmulateRestMiddleware)


نحوه نصب


نصب پکیج whl emulaterest-0.2:

    pip install emulaterest-0.2.whl


نصب پکیج tar.gz emulaterest-0.2:

    pip install emulaterest-0.2.tar.gz