diff options
| author | Chris McDonough <chrism@plope.com> | 2012-02-23 20:42:57 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2012-02-23 20:42:57 -0500 |
| commit | 3b9e5f1df23e42eabfc41e8726c27a7227230b61 (patch) | |
| tree | 98852246f604c7a52fe97479b8e14542d709e852 /docs | |
| parent | b0ebdf0bf54b1eb40d714710e1fcaf24a055003e (diff) | |
| download | pyramid-3b9e5f1df23e42eabfc41e8726c27a7227230b61.tar.gz pyramid-3b9e5f1df23e42eabfc41e8726c27a7227230b61.tar.bz2 pyramid-3b9e5f1df23e42eabfc41e8726c27a7227230b61.zip | |
fix
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/narr/assets.rst | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/docs/narr/assets.rst b/docs/narr/assets.rst index 22b38c929..e8e915297 100644 --- a/docs/narr/assets.rst +++ b/docs/narr/assets.rst @@ -379,13 +379,12 @@ do so, do things "by hand". First define the view callable. The above bit of code within ``favicon_view`` computes "here", which is a path relative to the Python file in which the function is defined. It then -uses the Python ``open`` function to obtain a file handle to a file within -"here" named ``static``, and returns a :class:`pyramid.response.FileResponse` -using the file path as the response's ``path`` argument and the request as -the response's ``request`` argument. :class:`pyramid.response.FileResponse` -will serve the file as quickly as possible when it's used this way. It makes -sure to set the right content length and content_type too based on the file -extension of the file you pass. +creates a :class:`pyramid.response.FileResponse` using the file path as the +response's ``path`` argument and the request as the response's ``request`` +argument. :class:`pyramid.response.FileResponse` will serve the file as +quickly as possible when it's used this way. It makes sure to set the right +content length and content_type too based on the file extension of the file +you pass. You might register such a view via configuration as a view callable that should be called as the result of a traversal: |
