Merge branch '1.3-branch'
| | |
| | | Configurator was an old-style ``pyramid.configuration.Configurator`` |
| | | instance. |
| | | |
| | | - Pyramid authorization policies did not show up in the introspector. |
| | | |
| | | Deprecations |
| | | ------------ |
| | | |
| | | - All references to the ``tmpl_context`` request variable were removed from |
| | | the docs. Its existence in Pyramid is confusing for people who were never |
| | | Pylons users. It was added as a porting convenience for Pylons users in |
| | | Pyramid 1.0, but it never caught on because the Pyramid rendering system is |
| | | a lot different than Pylons' was, and alternate ways exist to do what it |
| | | was designed to offer in Pylons. It will continue to exist "forever" but |
| | | it will not be recommended or mentioned in the docs. |
| | | |
| | | 1.3a9 (2012-02-22) |
| | | ================== |
| | | |
| | |
| | | ``request.session`` attribute will cause a |
| | | :class:`pyramid.exceptions.ConfigurationError` to be raised. |
| | | |
| | | .. attribute:: tmpl_context |
| | | |
| | | The template context for Pylons-style applications. |
| | | |
| | | .. attribute:: matchdict |
| | | |
| | | If a :term:`route` has matched during this request, this attribute will |
| | |
| | | matches any route's pattern. In this case it does an HTTP redirect to the |
| | | slash-appended ``PATH_INFO``. |
| | | |
| | | To configure the slash-appending not found view in your application, change |
| | | the application's startup configuration, adding the following stanza: |
| | | |
| | | .. code-block:: python |
| | | :linenos: |
| | | |
| | | Let's use an example. If the following routes are configured in your |
| | | application: |
| | | |
| | |
| | | In addition to the standard :term:`WebOb` attributes, :app:`Pyramid` adds |
| | | special attributes to every request: ``context``, ``registry``, ``root``, |
| | | ``subpath``, ``traversed``, ``view_name``, ``virtual_root``, |
| | | ``virtual_root_path``, ``session``, and ``tmpl_context``, ``matchdict``, and |
| | | ``matched_route``. These attributes are documented further within the |
| | | ``virtual_root_path``, ``session``, ``matchdict``, and ``matched_route``. |
| | | These attributes are documented further within the |
| | | :class:`pyramid.request.Request` API documentation. |
| | | |
| | | .. index:: |
| | |
| | | Configurator were removed from the documentation. They have been |
| | | deprecated since Pyramid 1.1. |
| | | |
| | | - All references to the ``tmpl_context`` request variable were removed from |
| | | the docs. Its existence in Pyramid is confusing for people who were never |
| | | Pylons users. It was added as a porting convenience for Pylons users in |
| | | Pyramid 1.0, but it never caught on because the Pyramid rendering system is |
| | | a lot different than Pylons' was, and alternate ways exist to do what it |
| | | was designed to offer in Pylons. It will continue to exist "forever" but |
| | | it will not be recommended or mentioned in the docs. |
| | | |
| | | Documentation Enhancements |
| | | -------------------------- |
| | | |
| | |
| | | intr['policy'] = policy |
| | | # authorization policy used by view config (phase 3) and |
| | | # authentication policy (phase 2) |
| | | self.action(IAuthorizationPolicy, register, order=PHASE1_CONFIG) |
| | | self.action(IAuthorizationPolicy, register, order=PHASE1_CONFIG, |
| | | introspectables=(intr,)) |
| | | self.action(None, ensure) |
| | | |
| | | def _set_authorization_policy(self, policy): |
| | |
| | | |
| | | @reify |
| | | def tmpl_context(self): |
| | | """ Template context (for Pylons apps) """ |
| | | # docs-deprecated template context for Pylons-like apps; do not |
| | | # remove. |
| | | return TemplateContext() |
| | | |
| | | @reify |