From b33dcac47dc0e759cd77a1548d8b38663a977df0 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 24 Dec 2010 16:22:55 -0500 Subject: - Fix API documentation rendering for ``pyramid.view.static`` --- docs/api/view.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'docs/api') diff --git a/docs/api/view.rst b/docs/api/view.rst index 0057cca4a..4dddea25f 100644 --- a/docs/api/view.rst +++ b/docs/api/view.rst @@ -18,6 +18,7 @@ .. autoclass:: static :members: + :inherited-members: .. autofunction:: append_slash_notfound_view(context, request) -- cgit v1.2.3 From 8739f576ed84bb48cec9c2d4b60e92878a273b1f Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 29 Dec 2010 14:47:32 -0500 Subject: factor deriver from mapper --- docs/api/interfaces.rst | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs/api') diff --git a/docs/api/interfaces.rst b/docs/api/interfaces.rst index b3c14e5f7..3ce926230 100644 --- a/docs/api/interfaces.rst +++ b/docs/api/interfaces.rst @@ -35,3 +35,7 @@ Other Interfaces .. autointerface:: ITemplateRenderer + .. autointerface:: IViewMapperFactory + + .. autointerface:: IViewMapper + -- cgit v1.2.3 From 2526d8bdec3c2d84f3ab8ec1983150927fce7eae Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 31 Dec 2010 17:15:43 -0500 Subject: - The ``pyramid.interfaces.IAuthenticationPolicy`` interface now specifies an ``unauthenticated_userid`` method. This method supports an important optimization required by people who are using persistent storages which do not support object caching and whom want to create a "user object" as a request attribute. - A new API has been added to the ``pyramid.security`` module named ``unauthenticated_userid``. This API function calls the ``unauthenticated_userid`` method of the effective security policy. - An ``unauthenticated_userid`` method has been added to the dummy authentication policy returned by ``pyramid.config.Configurator.testing_securitypolicy``. It returns the same thing as that the dummy authentication policy's ``authenticated_userid`` method. - Since the ``pyramid.interfaces.IAuthenticationPolicy`` interface now specifies that a policy implementation must implement an ``unauthenticated_userid`` method, all third-party custom authentication policies now must implement this method. It, however, will only be called when the global function named ``pyramid.security.unauthenticated_userid`` is invoked, so if you're not invoking that, you will not notice any issues. - The (non-API) method of all internal authentication policy implementations previously named ``_get_userid`` is now named ``unauthenticated_userid``, promoted to an API method. If you were overriding this method, you'll now need to override it as ``unauthenticated_userid`` instead. --- docs/api/security.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs/api') diff --git a/docs/api/security.rst b/docs/api/security.rst index 4acf5fe4d..de249355d 100644 --- a/docs/api/security.rst +++ b/docs/api/security.rst @@ -10,6 +10,8 @@ Authentication API Functions .. autofunction:: authenticated_userid +.. autofunction:: unauthenticated_userid + .. autofunction:: effective_principals .. autofunction:: forget -- cgit v1.2.3 From 44166612ba6fcf42f20b1812c5fa79b8504aa3c4 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 1 Jan 2011 17:05:46 -0500 Subject: - The class ``pyramid.authentication.AuthTktCookieHelper`` is now an API. This class can be used by third-party authentication policy developers to help in the mechanics of authentication cookie-setting. --- docs/api/authentication.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'docs/api') diff --git a/docs/api/authentication.rst b/docs/api/authentication.rst index 54db77417..a6d4c1e18 100644 --- a/docs/api/authentication.rst +++ b/docs/api/authentication.rst @@ -3,6 +3,9 @@ :mod:`pyramid.authentication` -------------------------------- +Authentication Policies +~~~~~~~~~~~~~~~~~~~~~~~ + .. automodule:: pyramid.authentication .. autoclass:: AuthTktAuthenticationPolicy @@ -11,3 +14,10 @@ .. autoclass:: RemoteUserAuthenticationPolicy +Helper Classes +~~~~~~~~~~~~~~ + + .. autoclass:: AuthTktCookieHelper + + + -- cgit v1.2.3 From 5653d13e554433adf34fd81b2c6593a54e7c4ea1 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 3 Jan 2011 03:10:15 -0500 Subject: - Add a new API ``pyramid.url.current_route_url``, which computes a URL based on the "current" route (if any) and its matchdict values. --- docs/api/url.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs/api') diff --git a/docs/api/url.rst b/docs/api/url.rst index 1aa3082b7..01be76283 100644 --- a/docs/api/url.rst +++ b/docs/api/url.rst @@ -9,6 +9,8 @@ .. autofunction:: route_url + .. autofunction:: current_route_url + .. autofunction:: route_path .. autofunction:: static_url -- cgit v1.2.3 From da358e42a1dda347f04d9331bb1e43f065546133 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 16 Jan 2011 01:32:29 -0500 Subject: simplify slightly --- docs/api/config.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs/api') diff --git a/docs/api/config.rst b/docs/api/config.rst index 3f37e739c..51666f53f 100644 --- a/docs/api/config.rst +++ b/docs/api/config.rst @@ -76,6 +76,8 @@ .. automethod:: set_renderer_globals_factory + .. automethod:: add_directive + .. automethod:: testing_securitypolicy .. automethod:: testing_resources -- cgit v1.2.3 From e333c2c2236cbfd11809ee393aa71be1b4846d88 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 16 Jan 2011 17:25:34 -0500 Subject: Remove configurator.add_handler, handler-related functions and methods from pyramid.view, handler ZCML directive. This functionality is to be moved to a "pyramid_handlers" package. Fix add_directive to properly persist directives across configurator creations. --- docs/api/config.rst | 2 -- 1 file changed, 2 deletions(-) (limited to 'docs/api') diff --git a/docs/api/config.rst b/docs/api/config.rst index 51666f53f..b4f85c248 100644 --- a/docs/api/config.rst +++ b/docs/api/config.rst @@ -48,8 +48,6 @@ .. automethod:: add_translation_dirs - .. automethod:: add_handler - .. automethod:: add_view .. automethod:: derive_view -- cgit v1.2.3 From c1eb0c69f2067baa567f68f6cc472397ec71f65a Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 18 Jan 2011 10:39:24 -0500 Subject: - The ``make_app`` function has been removed from the ``pyramid.router`` module. It continues life within the ``pyramid_zcml`` package. This leaves the ``pyramid.router`` module without any API functions. - The ``configure_zcml`` setting within the deployment settings (within ``**settings`` passed to a Pyramid ``main`` function) has ceased to have any meaning. - The ``starter_zcml`` paster template has been moved to the ``pyramid_zcml`` package. - The ``bfg2pyramid`` script now converts ZCML include tags that have ``repoze.bfg.includes`` as a package attribute to the value ``pyramid_zcml``. For example, ```` will be converted to ````. - The ``load_zcml`` method of a Configurator has been removed from the Pyramid core. Loading ZCML is now a feature of the ``pyramid_zcml`` package, which can be downloaded from PyPI. Documentation for the package should be available via http://pylonsproject.org, which describes how to get this method back after depending upon ``pyramid_zcml`` as an ``install_requires`` dependency. - The ``pyramid.includes`` subpackage has been removed. ZCML files which use include the package ``pyramid.includes`` (e.g. ````) now must include the ``pyramid_zcml`` package instead (e.g. ``). - The "Declarative Configuration" narrative chapter has been removed (it was moved to the ``pyramid_zcml`` pakcage). - The add_directive method now accepts an "action_wrap" flag. - Fix some orphaned references. - Remove some docstring references to ZCML directives. - All integration test fixtures have been changed to use imperative configuration rather than ZCML configuration. --- docs/api/config.rst | 2 -- docs/api/router.rst | 8 -------- 2 files changed, 10 deletions(-) delete mode 100644 docs/api/router.rst (limited to 'docs/api') diff --git a/docs/api/config.rst b/docs/api/config.rst index b4f85c248..05bcb8146 100644 --- a/docs/api/config.rst +++ b/docs/api/config.rst @@ -52,8 +52,6 @@ .. automethod:: derive_view - .. automethod:: load_zcml(spec) - .. automethod:: make_wsgi_app() .. automethod:: override_asset(to_override, override_with) diff --git a/docs/api/router.rst b/docs/api/router.rst deleted file mode 100644 index e5ffe97ce..000000000 --- a/docs/api/router.rst +++ /dev/null @@ -1,8 +0,0 @@ -.. _router_module: - -:mod:`pyramid.router` ---------------------- - -.. automodule:: pyramid.router - -.. autofunction:: pyramid.router.make_app(root_factory, package=None, filename='configure.zcml', settings=None) -- cgit v1.2.3 From 14e91bfd4af61251853b73aad33ff47c237339aa Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 19 Jan 2011 22:27:06 -0500 Subject: - Added "Adding Methods to the Configurator via ``add_directive``" section to Advanced Configuration narrative chapter. --- docs/api/config.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/api') diff --git a/docs/api/config.rst b/docs/api/config.rst index 05bcb8146..4b5f1fa21 100644 --- a/docs/api/config.rst +++ b/docs/api/config.rst @@ -28,6 +28,8 @@ .. automethod:: include + .. automethod:: add_directive + .. automethod:: with_package .. automethod:: maybe_dotted @@ -72,8 +74,6 @@ .. automethod:: set_renderer_globals_factory - .. automethod:: add_directive - .. automethod:: testing_securitypolicy .. automethod:: testing_resources -- cgit v1.2.3 From 72ad3374afb491d652e2a22951b09ca399c8d0c5 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 21 Jan 2011 02:01:18 -0500 Subject: - Add docs for ``add_finished_callback``, ``add_response_callback``, ``route_path``, ``route_url``, and ``static_url`` methods to ``pyramid.request.Request`` API docs. --- docs/api/request.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'docs/api') diff --git a/docs/api/request.rst b/docs/api/request.rst index 13b434a51..912634b62 100644 --- a/docs/api/request.rst +++ b/docs/api/request.rst @@ -113,3 +113,15 @@ request, the value of this attribute will be ``None``. See :ref:`matched_route`. + .. automethod:: add_response_callback + + .. automethod:: add_finished_callback + + .. automethod:: route_url + + .. automethod:: route_path + + .. automethod:: resource_url + + .. automethod:: static_url + -- cgit v1.2.3 From d533b19d06ffa2e3e55dfdf7689dbd718ffeec7a Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 28 Jan 2011 23:45:57 -0500 Subject: - Removed API documentation for ``pyramid.testing`` APIs named ``registerDummySecurityPolicy``, ``registerResources``, ``registerModels``, ``registerEventListener``, ``registerTemplateRenderer``, ``registerDummyRenderer``, ``registerView``, ``registerUtility``, ``registerAdapter``, ``registerSubscriber``, ``registerRoute``, and ``registerSettings``. - Deprecated-since-BFG-1.2 APIs from ``pyramid.testing`` now properly emit deprecation warnings. --- docs/api/testing.rst | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'docs/api') diff --git a/docs/api/testing.rst b/docs/api/testing.rst index fdcdadee8..f388dc263 100644 --- a/docs/api/testing.rst +++ b/docs/api/testing.rst @@ -5,26 +5,6 @@ .. automodule:: pyramid.testing - .. autofunction:: registerDummySecurityPolicy - - .. autofunction:: registerResources - - .. autofunction:: registerEventListener - - .. autofunction:: registerTemplateRenderer - - .. autofunction:: registerView - - .. autofunction:: registerUtility - - .. autofunction:: registerAdapter - - .. autofunction:: registerSubscriber - - .. autofunction:: registerRoute - - .. autofunction:: registerSettings - .. autofunction:: setUp .. autofunction:: tearDown -- cgit v1.2.3 From a5ef0f1ce6b1daa019325d13e5a834d329a41d62 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 29 Jan 2011 00:09:43 -0500 Subject: extend description of settings --- docs/api/registry.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'docs/api') diff --git a/docs/api/registry.rst b/docs/api/registry.rst index 5f61b1122..4d327370a 100644 --- a/docs/api/registry.rst +++ b/docs/api/registry.rst @@ -9,6 +9,8 @@ .. attribute:: settings - The :term:`deployment settings` object. See :ref:`deployment_settings` - for information. + The dictionary-like :term:`deployment settings` object. See + :ref:`deployment_settings` for information. This object is often + accessed as ``request.registry.settings`` or + ``config.registry.settings`` in a typical Pyramid application. -- cgit v1.2.3 From 86bbe8bddb1a0e62e7cd811cf2df0d57d72827dc Mon Sep 17 00:00:00 2001 From: Christopher Lambacher Date: Sat, 12 Feb 2011 17:27:59 -0500 Subject: Add make_localizer function & docs & tests --- docs/api/i18n.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs/api') diff --git a/docs/api/i18n.rst b/docs/api/i18n.rst index 0c2f8b86e..53e8c8a9b 100644 --- a/docs/api/i18n.rst +++ b/docs/api/i18n.rst @@ -24,6 +24,8 @@ .. autofunction:: default_locale_negotiator + .. autofunction:: make_localizer + See :ref:`i18n_chapter` for more information about using :app:`Pyramid` internationalization and localization services within an application. -- cgit v1.2.3 From 9fd15137314f304559479c1846d930a36b0e772e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 9 Mar 2011 01:21:00 -0500 Subject: leave some breadcrumbs for finding renderered response attribute settings --- docs/api/request.rst | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'docs/api') diff --git a/docs/api/request.rst b/docs/api/request.rst index 912634b62..d17441c0a 100644 --- a/docs/api/request.rst +++ b/docs/api/request.rst @@ -125,3 +125,12 @@ .. automethod:: static_url + .. attribute:: response_* + + You can set attributes on a :class:`pyramid.request.Request` which will + influence the behavor of *rendered* responses (views which use a + :term:`renderer` and which don't directly return a response). These + attributes begin with ``response_``, such as ``response_headerlist``. If + you need to influence response values from a view that uses a renderer + (such as the status code, a header, the content type, etc) see, + :ref:`response_request_attrs`. -- cgit v1.2.3