[Zope] Re: LocalFS problems with @import-ing stylesheets

Chris Beaven chris at d-designz.co.nz
Tue Oct 11 00:03:57 EDT 2005


Samuel Souk-aloun wrote:
> I can confirm the problem, the stylesheet is not rendered from localfs
> with firefox
> 
> the problem is caused by an incorect http header "text/plain" instead of
> "text/css"
> I've tried to add a type_map to the LocalFS but the content-type does
> not change
> so, for me, it is clearly a LocalFS issue
> 
> anyone knows how to hardcode this content-type in LocalFS.py ?
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
> 

add this line to the typemap:
.css text/css DTMLDocument

It works for me
I hardcoded it into LocalFS.py (the last line is the one you need to add):
_types = {
     '.html': ('text/html', 'DTMLDocument'),
     '.htm': ('text/html', 'DTMLDocument'),
     '.css': ('text/css', 'DTMLDocument'),  # ***SmileyChris *NEW*




More information about the Zope mailing list