List Info

Thread: Using a CSS with cherrypy ?




Using a CSS with cherrypy ?
user name
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-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 16:28:20

--- "francois.schnellgmail.com"
<francois.schnellgmail.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-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 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&quot; type=";text/css&quot; href=";../stylesheet.css&quot;>
#### 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.schnellgmail.com <gmail.com">francois.schnellgmail.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&gt; &nbsp;etc html etc &nbsp;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=&quot;hello.conf")&nbsp;  in &nbsp;my ; hello.py ?

If so what should I put in




--
----
&quot;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&quot; 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-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-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-04 22:40:25


On 3/4/06, gmail.com">francois.schnellgmail.com <gmail.com">francois.schnellgmail.com > wrote:
http://www.serpia.org/cherrypy

which reminds me that I need to update the tutorial using absolute paths and using underscore variable names
thanks, Dimitri
(nice to know that someone is actually reading my stuff

~Arthur Schopenhauer
----
Please visit dimitri's website: www.serpia.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cherrypy-users&quot; 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-5]

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