Hello,
I've started using web.py and have encountered a few issues/ questions
in relation to subapplications.
1) are subapplications compatible with web.py in apache/mod_wsgi? if
so, how are subapplications invoked?
I've currently got main.py, and search.py:
-- search.py
import web
urls = (
'/pingsearch', 'pingsearch'
)
class pingsearch:
def GET(self):
return "ping Search!"
app_search = web.application(urls, globals()).wsgifunc()
--- main.py
...
from views import search
urls = (
'/ping', 'ping',
'/search', search.app_search,
'/', 'root',
)
class root:
def GET(self):
return "hello?"
class ping:
def GET(self):
return "pong"
....
application = web.application(urls, globals()).wsgifunc()
when I load this app, "/" and "/ping" work as expected, but /search/
pingsearch returns a "not found" message. I have no idea why, aside
from perhaps being loaded via wsgi.
2) is it possible to map more than one subapplication to the same base
url?
so something like:
urls = (
'/', subapp1.app,
'/', subapp2.app,
'/', 'homepage',
)
where each set of urls in the subapps are unique. This would make
managing code easier/ more modular (the purpose of subapps), but
perhaps without requiring unique urls in the master app for every
subapp.
apologies if #2 is possible - #1 is preventing me from experimenting
with this.
any help would be much appreciated.
thanks!
-Chris
--
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.