Hello,

wiki.py just has to be located within the python path so it can be
imported when this code executes.  It should be structured like a
basic application (see http://webpy.org/docs/0.3/apps/basic) and have
the app variable defined globally as a web.application instance.

For instance, it might look something like this:

wiki.py:

urls = (
    '/', 'Index',
)

app = web.application(urls, globals())

class Index:
    def GET(self):
        return "<h1>Welcome to wiki</h1>"



Now, if you ran your subdir_application, and went to 
http://localhost:8080/wiki/,
it would return "<h1>Welcome to wiki</h1>".

Hope that helps,
Justin


On Feb 4, 5:08 pm, boubou_cs <[email protected]> wrote:
> Is it possible to have a little more explicit tutorial about subdir
> app ?
> I do not understand how to insert the wiki example.
> If code.py contains the following example given in the documentation :
>
> import wiki
>
> mapping = (
>     "/wiki", wiki.app)
>
> app = web.subdir_application(mapping)
>
> if __name__ == '__main__:
>     app.run()
>
> where should we put wiki.py and how its structure is ?
> thank you for your lights ;)

-- 
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.

Reply via email to