Help needed with using Webpy with Genshi - browser says: "not found".

27 views
Skip to first unread message

Barry

unread,
Aug 22, 2012, 12:55:56 PM8/22/12
to we...@googlegroups.com
Hi, I have webpy and mod_wsgi working fine with the following code:

# -*- coding: utf-8 -*-
import web

urls = (
    '/(.*)', 'hello'
)

class hello:
    def GET(self, name):
        if not name:
            name = 'World'
        return 'Hello, ' + name + '!'

if __name__ == "__main__":
    app.run()


app = web.application(urls, globals(), autoreload=False)
application = app.wsgifunc()

but when I try to use Genshi (as per this page: <http://webpy.org/src/genshi>) and change the code to this:

# -*- coding: utf-8 -*-
 
import web
from web.contrib import template

render = template.render_genshi(['./templates/'])
 
urls = (
    '/', 'index'
)
 
class index:
    def GET(self):
        name = 'John Doe'
        return render.index(name=name)
 
if __name__ == "__main__":
        app.run()

app = web.application(urls, globals(), autoreload=False)
application = app.wsgifunc()

the browser says "not found".

The apache logs don't seem to be reporting any errors right now (the were before, I'll keep trying).

Also, what is the correct way to use the webpy debugger when using apache to serve the pages?

Any help would be greatly appreciated.
Reply all
Reply to author
Forward
0 new messages