webob.static
-- Serving static files¶
- class webob.static.FileApp(filename, **kw)¶
An application that will send the file at the given filename.
Adds a mime type based on mimetypes.guess_type().
- class webob.static.DirectoryApp(path, index_page='index.html', hide_index_with_redirect=False, **kw)¶
An application that serves up the files in a given directory.
This will serve index files (by default
index.html
), or setindex_page=None
to disable this. If you sethide_index_with_redirect=True
(it defaults to False) then requests to, e.g.,/index.html
will be redirected to/
.To customize FileApp instances creation (which is what actually serves the responses), override the make_fileapp method.