I'm not sure there is an "official" requirement for any directories in a basic web.py app. However, I commonly use two basics: static and templates.
The common need is to serve static files (js, images) in addition to any python rendered content. The built-in http server automatically looks for a 'static' directory in the directory where the application is running. http://webpy.org/cookbook/staticfiles It may or may not be the best approach, but here's how I fix it so you can run the app from any directory, and have the relative paths work without any issues. *import os import sys web_root_path = os.path.dirname(os.path.abspath(sys.argv[0])) os.chdir(web_root)* The second most popular is a "templates" directory, for building html templates to be parsed and populated with content from the server. That directory is configurable. http://webpy.org/docs/0.3/templetor On Mon, Mar 18, 2013 at 11:54 PM, 谢伟志 <[email protected]> wrote: > hey guys , I don't know the directory structures of webpy , can anyone > explain it to me ???? thanks > > -- > You received this message because you are subscribed to the Google Groups > "web.py" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/webpy?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "web.py" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/webpy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
