[Twisted-web] Problems with images and css

Stefano Masini stefano at pragma2000.com
Thu Sep 8 04:01:06 MDT 2005

On 9/8/05, Alberto Trujillo <alberto.trujillo at ucd.ie> wrote:
>     child_styles = static.File('./templates/styles')
>     child_images = static.File('./templates/images')

Since you're making relative references to files (by using the
dot-slash './templates...'), are you sure that your twisted
application on the server is run with the current working directory
correctly set to the root of your application file system?
If on your system you run the application with, say, twistd -noy
server.tac, and on the server you run it with twistd -noy
/myapp/server.tac, it would be no wonder if it didn't work. You wound
have to first chdir /myapp, and then run twistd. Or, you change all
the paths to absolute.

that's my 2 cents, hope it helps,

More information about the Twisted-web mailing list