[Twisted-web] twisted web and css files
John Aherne
johnaherne at rocs.co.uk
Mon Nov 26 08:16:23 EST 2012
As an additional test I took the simple demo from twisted web in 60 seconds
and checked that out.
from twisted.web.server import Site
from twisted.web.static import File
from twisted.internet import reactor
resource = File('/tmp')
resource.indexNames = ['adminuser.html']
factory = Site(resource)
reactor.listenTCP(8888, factory)
reactor.run()
The adminuser.html has the same sort of link to get the css and in this
case all renders successfully.
But here the whole site is set up as static so I can see why that might
have worked.
For anyone really interested below is the css as well.
body {
padding-left: 11em;
color: black;
background-color: #ff0000 }
h1 {
color: orange;
}
ul.navbar {
list-style-type: none;
padding: 0;
margin: 0;
position: absolute;
top: 2em;
left: 1em;
width: 7em }
h1 {
font-family: Helvetica, Geneva, Arial,
SunSans-Regular, sans-serif }
ul.navbar li {
background: #ececec;
margin: 0.5em 0;
padding: 0.3em;
border-right: 1em solid black }
ul.navbar a {
text-decoration: none }
a:link {
color: maroon }
a:visited {
color: blue }
address {
margin-top: 1em;
padding-top: 1em;
border-top: thin dotted }
.layout1 {
background-color: f2f2f2;
color: red;
align: center;
width: 50%
}
.box1 {
background-color: #efefef;
height: 20%
}
--
*John Aherne*
*
*
*
*
*
*
*www.rocs.co.uk
*
020 7223 7567
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-web/attachments/20121126/20372cfb/attachment.htm
More information about the Twisted-web
mailing list