- New API method: ``pyramid.settings.asbool``.
| | |
| | | - Added class vars ``matchdict`` and ``matched_route`` to |
| | | ``pyramid.request.Request``. Each is set to ``None``. |
| | | |
| | | - New API method: ``pyramid.settings.asbool``. |
| | | |
| | | Bug Fixes |
| | | --------- |
| | | |
| | |
| | | |
| | | .. autofunction:: get_settings |
| | | |
| | | .. autofunction:: asbool |
| | | |
| | | |
| | |
| | | return reg.queryUtility(ISettings) |
| | | |
| | | def asbool(s): |
| | | """ Return the boolean value ``True`` if the case-lowered value of string |
| | | input ``s`` is any of ``t``, ``true``, ``y``, ``on``, or ``1``, otherwise |
| | | return the boolean value ``False``.""" |
| | | s = str(s).strip() |
| | | return s.lower() in ('t', 'true', 'y', 'yes', 'on', '1') |
| | | |