diff options
| author | Chris McDonough <chrism@plope.com> | 2010-11-16 20:31:04 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2010-11-16 20:31:04 -0500 |
| commit | b68aadc3867a95a6376bb2157cc93210eb62a104 (patch) | |
| tree | e4b47fe1fc5e14edd8b9c0031544490c0a96ba6e /docs/narr/static.rst | |
| parent | f4c3876685fa222eed96985bbdf37347ad362df2 (diff) | |
| download | pyramid-b68aadc3867a95a6376bb2157cc93210eb62a104.tar.gz pyramid-b68aadc3867a95a6376bb2157cc93210eb62a104.tar.bz2 pyramid-b68aadc3867a95a6376bb2157cc93210eb62a104.zip | |
- The ``pyramid.settings.get_settings`` API is now deprecated. Use
``pyramid.threadlocals.get_registry().settings`` instead or use the
``settings`` attribute of the registry available from the request
(``request.registry.settings``).
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``: |
