Hi Francois,
francois.schnell gmail.com wrote:
> I've also created a /home/dir/static folder and put my
style.css in it.
>
> In my hello.conf file I've got (and only that):
>
> [staticContent]
> static=/home/dir/static
>
> But when I fire hello.py, Python says:
>
> WrongConfigValue: ("section: 'staticContent',
option: 'static', value:
> '/home/dir/static'", 'SyntaxError',
('invalid syntax', (None, 1, 3,
> 'a=/home/dir/static')))
>
> I just did a copy-paste of the example.
Ah, you need to see http://
www.cherrypy.org/wiki/StaticContent21.
But here is a quick example:
[/static]
staticFilter.on = True
staticFilter.dir = '/path/to/your/static_dir'
As long as style.css exists inside of
'/path/to/your/static_dir' and
your HTML code references '/static/style.css' you should
be set.
> I don't understand why this brings me a syntax error.
Sorry to be a
> newbie pain :(
It's not your fault. Our docs need some reworking.
Hope this helps.
Christian
http://www.dowski.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at http://
groups.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---
|