.. _wsgi_app_example: Raw WSGI ======== Integration into a WSGI app only requires to stack ToscaWidget's :mod:`tw.core.middleware `:: from tw.api import make_middleware def application(environ, start_response): # Your WSGI application ..... application = make_middleware(application, { 'toscawidgets.framework.default_view': 'mako', 'toscawidgets.middleware.inject_resources': True, }) Now this wrapped app can be fed to any WSGI compliant server. For an overview over the advanced configurations, see :doc:`../configuration`. To run this example you need to install `WebOb`_, `Genshi`_ and `tw.forms`_:: $ easy_install WebOb Genshi tw.forms .. literalinclude:: ../../examples/wsgi_app.py .. _Genshi: http://pypi.python.org/pypi/Genshi .. _WebOb: http://pypi.python.org/pypi/WebOb .. _tw.forms: http://pypi.python.org/pypi/tw.forms