contenttype Module

This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>

CONTENT_TYPE dictionary created against freedesktop.org’s shared mime info database version 1.1.

Deviations from official standards:
  • .md: application/x-genesis-rom –> text/x-markdown
  • .png: image/x-apple-ios-png –> image/png
Additions:
  • .load: text/html
  • .json: application/json
  • .jsonp: application/jsonp
  • .pickle: application/python-pickle
  • .w2p’: application/w2p
gluon.contenttype.contenttype(filename, default='text/plain')[source]

Returns the Content-Type string matching extension of the given filename.