7.2.5. root.pyΒΆ

Last page update: October 25, 2011

../../_images/root8.png

In this file you have to put the WSGI declaration.

If you follow the steps of the autocreation of the sites folder section, you will find the following WSGI declaration, that contains all the necessary to handle the WSGI:

#!/usr/bin/env python2.6
import sys
sys.stdout = sys.stderr
from gnr.web.gnrwsgisite import GnrWsgiSite
site = GnrWsgiSite(__file__)

def application(environ,start_response):
    return site(environ,start_response)

if __name__ == '__main__':
    from gnr.web.server import NewServer
    server=NewServer(__file__)
    server.run()

For more information on WSGI, please check the Genro WSGI page.

Previous topic

7.2.4. pages

Next topic

7.2.6. sitesconfig.xml

This Page