> Suppose a resource looks like this:
>
> class Resource:
> uri = "/api/resources/(\d+)"
> def GET(self, id):
> return "You're trying to query for Resource[%s]!" % id
Looks like what you want to use is web.auto_application.
app/
bin/
serve.py
resources/
__init__.py
someresource.py
app.py
# app.py
app = web.auto_application()
# someresource.py
from app import app
class Resource(app.page):
path = "/api/resources/(\d+)"
def GET(self, id):
return "You're trying to query for Resource[%s]!" % id
# serve.py
from resource.app import app
if __name__ == "__main__":
app.run()
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---