2

I come on CherryPy from PHP, but I have problem. I created in Eclipse project ( PyDev cherrypy ) and it shows in browser basic html but for some reason it want include css and js files. I included just like in php ( html, there is css folder, relative path is ok )

<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />

but it doesn't show. Below is my project screenshot. Can anybody tell em how to include in CherryPy css ? enter image description here

1 Answer 1

5

specify css and js and images dirs as an static directories in the configuration:

[/css]
tools.staticdir.on = True
tools.staticdir.dir = "static"

for more info on how to write site.config file:

http://www.cherrypy.org/wiki/StaticContent

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.