summaryrefslogtreecommitdiff
path: root/docs
AgeCommit message (Collapse)Author
2009-12-24Roles.Chris McDonough
2009-12-23Thread locals chapter roles.Chris McDonough
2009-12-23Roles.Chris McDonough
Explain use of renderers (somewhat redundantly) in the templates chapter.
2009-12-23- Add ``hook_zca`` and ``unhook_zca`` methods to the ``Configurator``Chris McDonough
API. - Add roles to configurator API docs.
2009-12-23- Added the ``repoze.bfg.authentication``,Chris McDonough
``repoze.bfg.authorization``, and ``repoze.bfg.interfaces`` modules to API documentation.
2009-12-23Roles and imperative documentation for security policy config.Chris McDonough
2009-12-23Roles.Chris McDonough
2009-12-23(no commit message)Chris McDonough
2009-12-23Not role.Chris McDonough
2009-12-23Roles.Chris McDonough
Add description of override_resource.
2009-12-22Roles.Chris McDonough
2009-12-22Roles.Chris McDonough
2009-12-22Roles.Chris McDonough
2009-12-22Roles.Chris McDonough
2009-12-22Use roles.Chris McDonough
2009-12-22Use roles.Chris McDonough
2009-12-22Use roles.Chris McDonough
2009-12-22Use :meth:, :func:, and :class: appropriately for configuration-related docs.Chris McDonough
2009-12-21Use renderer.Chris McDonough
2009-12-20Prep for 1.2a7.Chris McDonough
2009-12-20Document presence of the registry attribute.Chris McDonough
2009-12-20Get rid of add_adapter and add_utility APIs (config.registry.registerAdapter ↵Chris McDonough
and config.registry.registerUtility will work).
2009-12-20Fix tutorial as per bug noticed by Neill Cox.Chris McDonough
2009-12-20H.Chris McDonough
2009-12-19Revise unittesting documentation to use new configurator APIs.Chris McDonough
2009-12-19- Add four new testing-related APIs to theChris McDonough
``repoze.bfg.configuration.Configurator`` class: ``testing_securitypolicy``, ``testing_models``, ``testing_add_subscriber``, and ``testing_add_template``. These were added in order to provide more direct access to the functionality of the ``repoze.bfg.testing`` APIs named ``registerDummySecurityPolicy``, ``registerModels``, ``registerEventListener``, and ``registerTemplateRenderer`` when a configurator is used. The ``testing`` APIs named are nominally deprecated (although they will likely remain around "forever", as they are in heavy use in the wild). - Doc-deprecated most helper functions in the ``repoze.bfg.testing`` module. These helper functions likely won't be removed any time soon, nor will they generate a warning any time soon, due to their heavy use in the wild, but equivalent behavior exists in methods of a Configurator.
2009-12-19- Add a new API to the ``repoze.bfg.configuration.Configurator``Chris McDonough
class: ``add_settings``. This API can be used to add "settings" (information returned within via the ``repoze.bfg.settings.get_settings`` API) after the configurator has been initially set up. This is most useful for testing purposes.
2009-12-19- Add two new APIs to the ``repoze.bfg.configuration.Configurator``Chris McDonough
class: ``add_adapter`` and ``add_utility``. These, respectively, perform the same functions as the ``registerAdapter`` and ``registerUtility`` functions of a ZCA registry. They were added to allow for a more consistent testing API for applications that make use of the ZCA directly. - Cause the ``adapter``, ``utility``, and ``subscriber`` ZCML directives to use a ``Configurator`` instance and associated configurator APIs rather than a ZCA registry directly.
2009-12-19Wording.Chris McDonough
2009-12-19Wording.Chris McDonough
2009-12-19More docs.Chris McDonough
2009-12-19- Add a ``custom_predicates`` argument to the ``Configurator``Chris McDonough
``add_view`` method, the ``bfg_view`` decorator and the attribute list of the ZCML ``view`` directive. If ``custom_predicates`` is specified, it must be a sequence of predicate callables (a predicate callable accepts two arguments: ``context`` and ``request`` and returns ``True`` or ``False``). The associated view callable will only be invoked if all custom predicates return ``True``. Use one or more custom predicates when no existing predefined predicate is useful. Predefined and custom predicates can be mixed freely. - Add a ``custom_predicates`` argument to the ``Configurator`` ``add_route`` and the attribute list of the ZCML ``route`` directive. If ``custom_predicates`` is specified, it must be a sequence of predicate callables (a predicate callable accepts two arguments: ``context`` and ``request`` and returns ``True`` or ``False``). The associated route will match will only be invoked if all custom predicates return ``True``, else route matching continues. Use one or more custom predicates when no existing predefined predicate is useful. Predefined and custom predicates can be mixed freely.
2009-12-18Prep for 1.2a6.Chris McDonough
2009-12-17FeaturesChris McDonough
-------- - The ``Configurator`` object now has two new methods: ``begin`` and ``end``. The ``begin`` method is meant to be called before any "configuration" begins (e.g. before ``add_view``, et. al are called). The ``end`` method is meant to be called after all "configuration" is complete. Previously, before there was imperative configuration at all (1.1 and prior), configuration begin and end was invariably implied by the process of loading a ZCML file. When a ZCML load happened, the threadlocal data structure containing the request and registry was modified before the load, and torn down after the load, making sure that all framework code that needed ``get_current_registry`` for the duration of the ZCML load was satisfied. Some API methods called during imperative configuration, (such as ``Configurator.add_view`` when a renderer is involved) end up for historical reasons calling ``get_current_registry``. However, in 1.2a5 and below, the Configurator supplied no functionality that allowed people to make sure that ``get_current_registry`` returned the registry implied by the configurator being used. ``begin`` now serves this purpose. Inversely, ``end`` pops the thread local stack, undoing the actions of ``begin``. We make this boundary explicit to reduce the potential for confusion when the configurator is used in different circumstances (e.g. in unit tests and app code vs. just in initial app setup). Existing code written for 1.2a1-1.2a5 which does not call ``begin`` or ``end`` continues to work in the same manner it did before. It is however suggested that this code be changed to call ``begin`` and ``end`` to reduce the potential for confusion in the future. - All ``paster`` templates which generate an application skeleton now make use of the new ``begin`` and ``end`` methods of the Configurator they use in their respective copies of ``run.py`` and ``tests.py``. Documentation ------------- - All documentation that makes use of a ``Configurator`` object to do application setup and test setup now makes use of the new ``begin`` and ``end`` methods of the configurator. Bug Fixes --------- - When a ``repoze.bfg.exceptions.NotFound`` or ``repoze.bfg.exceptions.Forbidden`` *class* (as opposed to instance) was raised as an exception within a root factory (or route root factory), the exception would not be caught properly by the ``repoze.bfg.`` Router and it would propagate to up the call stack, as opposed to rendering the not found view or the forbidden view as would have been expected.
2009-12-11Fix typos pointed out by Steve Schmechel.Chris McDonough
2009-12-10Prep for 1.2a5.Chris McDonough
2009-12-10- Added a "Special Exceptions" section to the "Views" narrativeChris McDonough
documentation chapter explaining the effect of raising ``repoze.bfg.exceptions.NotFound`` and ``repoze.bfg.exceptions.Forbidden`` from within view code. - When the ``repoze.bfg.exceptions.NotFound`` or ``repoze.bfg.exceptions.Forbidden`` error is raised from within a custom root factory or the ``factory`` of a route, the appropriate response is now sent to the requesting user agent (the result of the notfound view or the forbidden view, respectively). When these errors are raised from within a root factory, the ``context`` passed to the notfound or forbidden view will be ``None``. Also, the request will not be decorated with ``view_name``, ``subpath``, ``context``, etc. as would normally be the case if traversal had been allowed to take place.
2009-12-10Docs.Chris McDonough
2009-12-10Fix overriding renderers rendering.Chris McDonough
2009-12-10typoFernando Correa Neto
2009-12-09typoFernando Correa Neto
2009-12-09typoFernando Correa Neto
2009-12-09typoFernando Correa Neto
2009-12-09Expand.Chris McDonough
2009-12-09(no commit message)Chris McDonough
2009-12-09Fix.Chris McDonough
2009-12-09- Added "Thread Locals" narrative chapter to documentation, and addedChris McDonough
a API chapter documenting the ``repoze.bfg.threadlocals`` module.
2009-12-09- Remove explanation of changing the request type in a new requestChris McDonough
event subscriber, as other predicates are now usually an easier way to get this done.
2009-12-09(no commit message)Chris McDonough
2009-12-09Excise make_app from docs.Chris McDonough