diff options
| author | Atsushi Odagiri <aodagx@gmail.com> | 2010-11-27 15:08:31 +0900 |
|---|---|---|
| committer | Atsushi Odagiri <aodagx@gmail.com> | 2010-11-27 15:08:31 +0900 |
| commit | cd2f78c893ce6ae98004189a1a0a649fac96d033 (patch) | |
| tree | 5ab84f72e6bf0476d7d40841f3341aaf9a4e54a4 /docs/narr/static.rst | |
| parent | ba32a8d0dcee7f3cef231e08ed60d52fbf60ed4f (diff) | |
| parent | 4d76ed6f46304d43a6b95da7a4d5388527bf6c1e (diff) | |
| download | pyramid-cd2f78c893ce6ae98004189a1a0a649fac96d033.tar.gz pyramid-cd2f78c893ce6ae98004189a1a0a649fac96d033.tar.bz2 pyramid-cd2f78c893ce6ae98004189a1a0a649fac96d033.zip | |
Merge remote branch 'remotes/upstream/master'
Diffstat (limited to 'docs/narr/static.rst')
| -rw-r--r-- | docs/narr/static.rst | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/docs/narr/static.rst b/docs/narr/static.rst index efeabd012..a01cbbabf 100644 --- a/docs/narr/static.rst +++ b/docs/narr/static.rst @@ -69,22 +69,21 @@ when generating a URL using :func:`pyramid.url.static_url`. .. note:: Using :func:`pyramid.url.static_url` in conjunction with a - :meth:`pyramid.configuration.Configurator.add_static_view` makes - it possible to put static media on a separate webserver during - production (if the ``name`` argument to - :meth:`pyramid.configuration.Configurator.add_static_view` is a - URL), while keeping static media package-internal and served by the - development webserver during development (if the ``name`` argument - to :meth:`pyramid.configuration.Configurator.add_static_view` is - a view name). To create such a circumstance, we suggest using the - :func:`pyramid.settings.get_settings` API in conjunction with a - setting in the application ``.ini`` file named ``media_location``. - Then set the value of ``media_location`` to either a view name or a - URL depending on whether the application is being run in - development or in production (use a different `.ini`` file for - production than you do for development). This is just a suggestion - for a pattern; any setting name other than ``media_location`` could - be used. + :meth:`pyramid.configuration.Configurator.add_static_view` makes it + possible to put static media on a separate webserver during production (if + the ``name`` argument to + :meth:`pyramid.configuration.Configurator.add_static_view` is a URL), + while keeping static media package-internal and served by the development + webserver during development (if the ``name`` argument to + :meth:`pyramid.configuration.Configurator.add_static_view` is a view + name). To create such a circumstance, we suggest using the + :attr:`pyramid.registry.Registry.settings` API in conjunction with a + setting in the application ``.ini`` file named ``media_location``. Then + set the value of ``media_location`` to either a view name or a URL + depending on whether the application is being run in development or in + production (use a different `.ini`` file for production than you do for + development). This is just a suggestion for a pattern; any setting name + other than ``media_location`` could be used. For example, :meth:`pyramid.configuration.Configurator.add_static_view` may be fed a ``name`` argument which is ``http://example.com/images``: |
