List Info

Thread: Using a CSS with cherrypy ?




Using a CSS with cherrypy ?
user name
2006-03-03 19:56:56
Thanks you for your quick answer.

I looked at the page you mention.

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.

I don't understand why this brings me a syntax error. Sorry
to be a
newbie pain :(

francois


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://
groups.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---

Using a CSS with cherrypy ?
user name
2006-03-03 20:24:33
Hi Francois,

francois.schnellgmail.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-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at http://
groups.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )