file :corewebserver.py
import web
import os
from web.contrib.template import render_mako
urls = (
"/blank/(.*)","blank",
"/hello", "hello"
)
app = web.application(urls, globals(), autoreload=True)
render = render_mako(
directories=['templates'],
input_encoding='utf-8',
output_encoding='utf-8',
)
class blank:
def GET(self,url):
return render.blank()
class hello:
def GET(self,name):
return render.osd(name="come on baby")
app.run()
file :A.py
import corewebserver
class blog:
def GET(self, path):
return "blog " + path
corewebserver.app.add_mapping('/blog/(.*)', 'blog')
I wanna automatic to combine the A.py B.py C.py class to the
webserver .
How could i do it . with this method , the mapping is not work , how
could i do that ?
I`m not try the subdir_application
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---