|
List Info
Thread: Using a CSS with cherrypy ?
|
|
| Using a CSS with cherrypy ? |

|
2006-03-03 16:13:00 |
Hello,
I have a hello.py using cherrypy which works well
In the same directory I have a style.css
In hello.py when I return "<head> <link
href='style.css'
rel='stylesheet' type='text/css'> </head> etc
html etc html "
it ignores my css file.
Do I need ?
- to build a config file in the same directory (like
hello.conf) ?
- add a
cherrypy.config.update(file="hello.conf") in
my hello.py ?
If so what should I put in hello.conf ?
Thanks in advance
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-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
-~----------~----~----~----~------~----~------~--~---
|
|
| Using a CSS with cherrypy ? |

|
2006-03-03 16:28:20 |
--- "francois.schnell gmail.com"
<francois.schnell gmail.com> wrote:
>
> Hello,
>
> I have a hello.py using cherrypy which works well
> In the same directory I have a style.css
>
> In hello.py when I return "<head> <link
href='style.css'
> rel='stylesheet' type='text/css'> </head>
etc html etc html "
> it ignores my css file.
You need to list the css file as a static file in the static
content section of
your config.
See here for more info
http://www
.cherrypy.org/wiki/StaticContent
Regards,
Andy
___________________________________________________________
Yahoo! Photos – NEW, now offering a quality print service
from just 8p a photo http://uk.photos.yahoo.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
-~----------~----~----~----~------~----~------~--~---
|
|
| Using a CSS with cherrypy ? |

|
2006-03-03 23:01:58 |
|
Hi Francois, here is how I do it on my website:
the mainbody.html file: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> ### more stuff here
<link rel="stylesheet" type="text/css" href="../stylesheet.css"> #### more stuff here
the project.conf file: #### more stuff here [/stylesheet.css] static_filter.on = True
static_filter.file = "/home/yourdirectory/html/stylesheet.css" #### more stuff here
Hope this helps a bit, Dimitri
On 3/3/06,
gmail.com">francois.schnell gmail.com <gmail.com">francois.schnell gmail.com> wrote:
Hello,
I have a hello.py using cherrypy which works well In the same directory I have a style.css
In hello.py when I return "<head> <link href='style.css' rel='stylesheet' type='text/css'> </head> etc html etc html "
it ignores my css file.
Do I need ? - to build a config file in the same directory (like hello.conf) ? - add a cherrypy.config.update(file="hello.conf") in my hello.py ?
If so what should I put in
-- ---- "All truth passes through three stages. First, it is ridiculed. Second, it is violently opposed. Third, it is accepted as being self-evident."
~Arthur Schopenhauer ---- Please visit dimitri's website: www.serpia.org
--~--~---------~--~----~------------~-------~--~----~
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 -~----------~----~----~----~------~----~------~--~---
|
| Using a CSS with cherrypy ? |

|
2006-03-04 14:44:54 |
Thanks all for your help !
It works now with the proper absolute path in
[/stylesheet.css] .
I'm also using now the directory structure Dimitri shows
here:
http://www.serpia.org/
cherrypy
Thanks again
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
|
|
| Using a CSS with cherrypy ? |

|
2006-03-04 22:40:25 |
|
|
[1-5]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|