[Zope-Checkins] CVS: Zope/lib/python/OFS - content_types.py:1.15.50.1

Andreas Jung andreas@zope.com
Thu, 8 Nov 2001 09:44:05 -0500


Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv3275/lib/python/OFS

Modified Files:
      Tag: ajung-webdav-debug
	content_types.py 
Log Message:
added reverse_types_map dictionary for mimetypes module


=== Zope/lib/python/OFS/content_types.py 1.15 => 1.15.50.1 ===
     mimetypes.types_map[name]=val
 
+mimetypes.reverse_types_map = {}
+for k,v in mimetypes.types_map.items():
+    mimetypes.reverse_types_map[v]=k
+
+
+
 def guess_content_type(name='', body='', default=None):
     # Attempt to determine the content type (and possibly
     # content-encoding) based on an an object's name and