RE: CSS link to stylesheet does not work in twisted

Hello Again, I am using twisted.web.http to prototype a few webpages and link to my stylesheet ( <link rel=stylesheet type="text/css" href="configstyle.css" />) does not work. If I save the page has a standalone HTML file and open it in a browser window, everything works fine, but not when I call it through twisted. Does anyone know why and is there a workaround ? -- Dafina A. Abernathy (DJ)

DJ wrote:
Hello Again,
I am using twisted.web.http to prototype a few webpages and link to my stylesheet ( <link rel=stylesheet type="text/css" href="configstyle.css" />) does not work. If I save the page has a standalone HTML file and open it in a browser window, everything works fine, but not when I call it through twisted. Does anyone know why and is there a workaround ?
This really doesn't sound like a Twisted issue. Does the Twisted server serve the stylesheet? Check that by trying to access it via your browser. It's possible you may need to adjust the link's href attribute to oiint to an HTTP source of the CSS stylesheet. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/

Dnia 2008-07-17, o godz. 09:54:15 DJ <d.a.abernathy@gmail.com> napisał(a):
Hello Again,
I am using twisted.web.http to prototype a few webpages and link to my stylesheet ( <link rel=stylesheet type="text/css" href="configstyle.css" />) does not work. If I save the page has a standalone HTML file and open it in a browser window, everything works fine, but not when I call it through twisted. Does anyone know why and is there a workaround ?
You need to add static.File child to your root resource. Read about addChild method of rend.Page . -- m

Hello Michael, It worked !!!! Thank you very much. !!! On Fri, Jul 18, 2008 at 6:45 AM, Michał Pasternak <michal.dtz@gmail.com> wrote:
Dnia 2008-07-17, o godz. 09:54:15 DJ <d.a.abernathy@gmail.com> napisał(a):
Hello Again,
I am using twisted.web.http to prototype a few webpages and link to my stylesheet ( <link rel=stylesheet type="text/css" href="configstyle.css" />) does not work. If I save the page has a standalone HTML file and open it in a browser window, everything works fine, but not when I call it through twisted. Does anyone know why and is there a workaround ?
You need to add static.File child to your root resource. Read about addChild method of rend.Page .
-- m
_______________________________________________ Twisted-web mailing list Twisted-web@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
-- Dafina A. Abernathy (DJ)
participants (3)
-
DJ
-
Michał Pasternak
-
Steve Holden