From 89f8d1e2b936cbf8bbaf0cf30ab541b7509c50ac Mon Sep 17 00:00:00 2001 From: Jamaludin Ahmad Date: Wed, 22 Dec 2010 10:11:00 +0700 Subject: remove redundant --- docs/narr/static.rst | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) (limited to 'docs/narr/static.rst') diff --git a/docs/narr/static.rst b/docs/narr/static.rst index 6b03b2349..53564a632 100644 --- a/docs/narr/static.rst +++ b/docs/narr/static.rst @@ -64,25 +64,6 @@ examples have shown usage of the ``name`` argument as a view name. When can be served from an external webserver. In this mode, the ``name`` is used as the URL prefix when generating a URL using :func:`pyramid.url.static_url`. -.. note:: - - Using :func:`pyramid.url.static_url` in conjunction with a - :meth:`pyramid.config.Configurator.add_static_view` makes it - possible to put static media on a separate webserver during production (if - the ``name`` argument to - :meth:`pyramid.config.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.config.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.config.Configurator.add_static_view` may be fed a ``name`` argument which is ``http://example.com/images``: @@ -114,10 +95,10 @@ imperative configuration for the same purpose. :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), + :meth:`pyramid.config.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 + :meth:`pyramid.config.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 -- cgit v1.2.3