[Twisted-Python] twisted.web.static.File and MIME types

Laurens Van Houtven _ at lvh.cc
Sat Jul 7 07:32:44 EDT 2012


I'm pretty sure that's how you do it. No _, so it's public :)

Yes, it should be documented -- maybe a ticket is in order?


cheers
lvh



On 07 Jul 2012, at 11:43, Tobias Oberstein wrote:

> Hi,
> 
> I need to add MIME types to twisted.web.static.File.
> 
> The following works, but seems to use internal stuff .. whats the "correct" way to do?
> 
> 
> from twisted.web.static import File
> 
> webdir = File(".")
> webdir.contentTypes['.crt'] = 'application/x-x509-ca-cert'
> 
> 
> http://twistedmatrix.com/documents/12.1.0/api/twisted.web.static.File.html
> 
> 
> Cheers,
> Tobias
> 
> 
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python




More information about the Twisted-Python mailing list