diff options
| author | Chris McDonough <chrism@plope.com> | 2012-02-21 11:53:07 -0800 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2012-02-21 11:53:07 -0800 |
| commit | e032ee46a632d30a1a24d93cb6f273e93b4732de (patch) | |
| tree | 084f2b9c84d03ccb0365c7e2d2c4c3d0d7f27382 | |
| parent | bb40d09a0241b9e19cdc86186a7abd30d4d491d3 (diff) | |
| parent | f4216ebb4097af71fc9477cd097360e08117d265 (diff) | |
| download | pyramid-e032ee46a632d30a1a24d93cb6f273e93b4732de.tar.gz pyramid-e032ee46a632d30a1a24d93cb6f273e93b4732de.tar.bz2 pyramid-e032ee46a632d30a1a24d93cb6f273e93b4732de.zip | |
Merge pull request #444 from mgedmin/fix-static-example
Fix favicon_view example: open the file in binary mode.
| -rw-r--r-- | docs/narr/assets.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/narr/assets.rst b/docs/narr/assets.rst index 4f80d33c7..2cc870619 100644 --- a/docs/narr/assets.rst +++ b/docs/narr/assets.rst @@ -374,7 +374,7 @@ do so, do things "by hand". First define the view callable. def favicon_view(request): here = os.path.dirname(__file__) - icon = open(os.path.join(here, 'static', 'favicon.ico')) + icon = open(os.path.join(here, 'static', 'favicon.ico'), 'rb') return Response(content_type='image/x-icon', app_iter=icon) The above bit of code within ``favicon_view`` computes "here", which is a |
