diff options
| author | Chris McDonough <chrism@agendaless.com> | 2010-07-04 02:02:10 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2010-07-04 02:02:10 +0000 |
| commit | 6bc66257ca3abfc02557b94a8086c811797e2ba9 (patch) | |
| tree | 92ca085fa13caa274d28943f21ba2ad277bf46ea /docs/narr | |
| parent | fc4a1756d8489d2d769580924939e03978826193 (diff) | |
| download | pyramid-6bc66257ca3abfc02557b94a8086c811797e2ba9.tar.gz pyramid-6bc66257ca3abfc02557b94a8086c811797e2ba9.tar.bz2 pyramid-6bc66257ca3abfc02557b94a8086c811797e2ba9.zip | |
documentation updates
Diffstat (limited to 'docs/narr')
| -rw-r--r-- | docs/narr/hooks.rst | 7 | ||||
| -rw-r--r-- | docs/narr/static.rst | 20 |
2 files changed, 27 insertions, 0 deletions
diff --git a/docs/narr/hooks.rst b/docs/narr/hooks.rst index a16849dcb..254e35e8e 100644 --- a/docs/narr/hooks.rst +++ b/docs/narr/hooks.rst @@ -337,6 +337,8 @@ class :class:`repoze.bfg.traversal.TraversalContextURL` in the <http://svn.repoze.org/repoze.bfg/trunk/repoze/bfg/traversal.py>`_ of the :term:`Repoze` Subversion repository. +.. _registering_configuration_decorators: + Registering Configuration Decorators ------------------------------------ @@ -423,3 +425,8 @@ performed, enabling you to set up the utility in advance: For full details, please read the `Venusian documentation <http://docs.repoze.org/venusian>`_. + +.. note:: + + Application-developer-registerable configuration decorators were + introduced in :mod:`repoze.bfg` 1.3. diff --git a/docs/narr/static.rst b/docs/narr/static.rst index d33831741..b2d481ba5 100644 --- a/docs/narr/static.rst +++ b/docs/narr/static.rst @@ -92,6 +92,26 @@ can be served from an external webserver. In this mode, the ``name`` is used as the URL prefix when generating a URL using :func:`repoze.bfg.url.static_url`. +.. note:: + + Using :func:`repoze.bfg.url.static_url` in conjunction with a + :meth:`repoze.bfg.configuration.Configurator.add_static_view` makes + it possible to put static media on a separate webserver during + production (if the ``name`` argument to + :meth:`repoze.bfg.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:`repoze.bfg.configuration.Configurator.add_static_view` is + a view name). To create such a circumstance, we suggest using the + :func:`repoze.bfg.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. + For example, the ``static`` ZCML directive may be fed a ``name`` argument which is ``http://example.com/images``: |
