diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/narr/static.rst | 23 | ||||
| -rw-r--r-- | docs/narr/views.rst | 2 |
2 files changed, 3 insertions, 22 deletions
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 diff --git a/docs/narr/views.rst b/docs/narr/views.rst index 155ece8df..ad28e48d4 100644 --- a/docs/narr/views.rst +++ b/docs/narr/views.rst @@ -3,7 +3,7 @@ Views ===== -One of the primary jobs of :app:`Pyramid` is is to find and invoke a +One of the primary jobs of :app:`Pyramid` is to find and invoke a :term:`view callable` when a :term:`request` reaches your application. View callables are bits of code which do something interesting in response to a request made to your application. |
