cannot access image,css,etc

im using, structure below:
/home/mopodo/website/ -> get wsgi function and pass to /var/www/ (OK)
<img src="../static/images/a.png"> -> this image not show in page the same issue happen with css

i wonder what is the base directory for domain
and why the elements cannot accessed?

Hi mopodo,

We are very close to providing out of the box static files for each web application. However at the moment you can serve static files out of /var/www/static.

It's an undocumented feature because it is a bit of a stopgap until we finish some other work. :-)

So if you create a folder called images in /var/www/static and put a.png inside it then would work as you expect it to.

you mean put the files like this:

and in html: <img href="static/images/a.png">
<link ref="static/bootstrap/css/a.css ...>

that works?

Files: yes.

Links: just remove the "static" - for example: /images/a.png.

finally it works...thanks buddy
hope static files be put into project directory soon :>

It's definitely a priority for us! Soon each web application will have it's own static files location.

another issue, im using and collect all html in 'template' folder
should i also put template in /var/www/ ?

No, they should stay with the code. One possible complexity is that the directory in which your web app runs is not fixed, so you'll need to give a full path when you specify the template directory; something like this:

render = web.template.render('/home/mopodo/website/templates/')