| | |
| | | ) |
| | | |
| | | from pyramid.exceptions import ConfigurationError |
| | | import pyramid.predicates |
| | | from pyramid.request import route_request_iface |
| | | from pyramid.urldispatch import RoutesMapper |
| | | |
| | | from pyramid.util import as_sorted_tuple, is_nonstr_iter |
| | | |
| | | import pyramid.predicates |
| | | |
| | | from pyramid.config.util import ( |
| | | action_method, |
| | | normalize_accept_offer, |
| | | predvalseq, |
| | | ) |
| | | from pyramid.config.actions import action_method |
| | | from pyramid.config.predicates import normalize_accept_offer, predvalseq |
| | | |
| | | |
| | | class RoutesConfiguratorMixin(object): |
| | |
| | | |
| | | When the context exits, the ``route_prefix`` is reset to the original. |
| | | |
| | | ``route_prefix`` is a string suitable to be used as a route prefix, |
| | | or ``None``. |
| | | |
| | | Example Usage: |
| | | |
| | | .. code-block:: python |
| | |
| | | config = Configurator() |
| | | with config.route_prefix_context('foo'): |
| | | config.add_route('bar', '/bar') |
| | | |
| | | ``route_prefix`` is a string suitable to be used as a route prefix, |
| | | or ``None``. |
| | | |
| | | .. versionadded:: 1.10 |
| | | |