summaryrefslogtreecommitdiff
path: root/docs/api/config.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/api/config.rst')
-rw-r--r--docs/api/config.rst134
1 files changed, 94 insertions, 40 deletions
diff --git a/docs/api/config.rst b/docs/api/config.rst
index 2b9d7bcef..e083dbc68 100644
--- a/docs/api/config.rst
+++ b/docs/api/config.rst
@@ -1,86 +1,140 @@
.. _configuration_module:
+.. role:: methodcategory
+ :class: methodcategory
+
:mod:`pyramid.config`
---------------------
.. automodule:: pyramid.config
- .. autoclass:: Configurator(registry=None, package=None, settings=None, root_factory=None, authentication_policy=None, authorization_policy=None, renderers=DEFAULT_RENDERERS, debug_logger=None, locale_negotiator=None, request_factory=None, renderer_globals_factory=None, default_permission=None, session_factory=None, autocommit=False)
+.. autoclass:: Configurator
- .. attribute:: registry
+ :methodcategory:`Controlling Configuration State`
- The :term:`application registry` which holds the configuration
- associated with this configurator.
+ .. automethod:: commit
+ .. automethod:: begin
+ .. automethod:: end
+ .. automethod:: include
+ .. automethod:: make_wsgi_app()
+ .. automethod:: scan
- .. automethod:: begin
+ :methodcategory:`Adding Routes and Views`
- .. automethod:: end
+ .. automethod:: add_route
+ .. automethod:: add_static_view(name, path, cache_max_age=3600, permission=NO_PERMISSION_REQUIRED)
+ .. automethod:: add_view
+ .. automethod:: add_notfound_view
+ .. automethod:: add_forbidden_view
- .. automethod:: hook_zca
+ :methodcategory:`Adding an Event Subscriber`
- .. automethod:: unhook_zca
+ .. automethod:: add_subscriber
- .. automethod:: get_settings
+ :methodcategory:`Using Security`
- .. automethod:: commit
+ .. automethod:: set_authentication_policy
+ .. automethod:: set_authorization_policy
+ .. automethod:: set_default_permission
+ .. automethod:: add_permission
- .. automethod:: action
+ :methodcategory:`Extending the Request Object`
- .. automethod:: include
+ .. automethod:: add_request_method
+ .. automethod:: set_request_property
- .. automethod:: add_directive
+ :methodcategory:`Using I18N`
- .. automethod:: with_package
+ .. automethod:: add_translation_dirs
+ .. automethod:: set_locale_negotiator
- .. automethod:: maybe_dotted
+ :methodcategory:`Overriding Assets`
- .. automethod:: absolute_asset_spec
+ .. automethod:: override_asset(to_override, override_with)
- .. automethod:: setup_registry(settings=None, root_factory=None, authentication_policy=None, renderers=DEFAULT_RENDERERS, debug_logger=None, locale_negotiator=None, request_factory=None, renderer_globals_factory=None)
+ :methodcategory:`Getting and Adding Settings`
+
+ .. automethod:: add_settings
+ .. automethod:: get_settings
- .. automethod:: add_renderer(name, factory)
+ :methodcategory:`Hooking Pyramid Behavior`
- .. automethod:: add_route
+ .. automethod:: add_renderer
+ .. automethod:: add_resource_url_adapter
+ .. automethod:: add_response_adapter
+ .. automethod:: add_traverser
+ .. automethod:: add_tween
+ .. automethod:: add_route_predicate
+ .. automethod:: add_view_predicate
+ .. automethod:: add_view_deriver
+ .. automethod:: set_request_factory
+ .. automethod:: set_root_factory
+ .. automethod:: set_session_factory
+ .. automethod:: set_view_mapper
- .. automethod:: add_static_view(name, path, cache_max_age=3600, permission='__no_permission_required__')
+ :methodcategory:`Extension Author APIs`
- .. automethod:: add_settings
+ .. automethod:: action
+ .. automethod:: add_directive
+ .. automethod:: with_package
+ .. automethod:: derive_view
- .. automethod:: add_subscriber
+ :methodcategory:`Utility Methods`
- .. automethod:: add_translation_dirs
+ .. automethod:: absolute_asset_spec
+ .. automethod:: maybe_dotted
- .. automethod:: add_view
+ :methodcategory:`ZCA-Related APIs`
- .. automethod:: derive_view
+ .. automethod:: hook_zca
+ .. automethod:: unhook_zca
+ .. automethod:: setup_registry
- .. automethod:: make_wsgi_app()
+ :methodcategory:`Testing Helper APIs`
- .. automethod:: override_asset(to_override, override_with)
+ .. automethod:: testing_add_renderer
+ .. automethod:: testing_add_subscriber
+ .. automethod:: testing_resources
+ .. automethod:: testing_securitypolicy
- .. automethod:: scan
+ :methodcategory:`Attributes`
- .. automethod:: set_forbidden_view
+ .. attribute:: introspectable
- .. automethod:: set_notfound_view
+ A shortcut attribute which points to the
+ :class:`pyramid.registry.Introspectable` class (used during
+ directives to provide introspection to actions).
- .. automethod:: set_locale_negotiator
+ .. versionadded:: 1.3
- .. automethod:: set_default_permission
+ .. attribute:: introspector
- .. automethod:: set_session_factory
+ The :term:`introspector` related to this configuration. It is an
+ instance implementing the :class:`pyramid.interfaces.IIntrospector`
+ interface.
- .. automethod:: set_request_factory
+ .. versionadded:: 1.3
- .. automethod:: set_renderer_globals_factory
+ .. attribute:: registry
- .. automethod:: set_view_mapper
+ The :term:`application registry` which holds the configuration
+ associated with this configurator.
- .. automethod:: testing_securitypolicy
+.. attribute:: global_registries
- .. automethod:: testing_resources
+ The set of registries that have been created for :app:`Pyramid`
+ applications, one for each call to
+ :meth:`pyramid.config.Configurator.make_wsgi_app` in the current
+ process. The object itself supports iteration and has a ``last`` property
+ containing the last registry loaded.
- .. automethod:: testing_add_subscriber
+ The registries contained in this object are stored as weakrefs, thus they
+ will only exist for the lifetime of the actual applications for which they
+ are being used.
- .. automethod:: testing_add_renderer
+.. autoclass:: not_
+.. attribute:: PHASE0_CONFIG
+.. attribute:: PHASE1_CONFIG
+.. attribute:: PHASE2_CONFIG
+.. attribute:: PHASE3_CONFIG