From 96820957ac659d51d79b1b30c296f98c086ee878 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 28 Oct 2010 21:32:43 -0400 Subject: add sessioning interfaces, configuration API, and a sample implementation that uses cookies --- docs/api/configuration.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'docs/api') diff --git a/docs/api/configuration.rst b/docs/api/configuration.rst index 5215bfb3c..6d5c9f16b 100644 --- a/docs/api/configuration.rst +++ b/docs/api/configuration.rst @@ -5,7 +5,7 @@ .. automodule:: pyramid.configuration - .. 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) + .. 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) .. attribute:: registry @@ -64,6 +64,8 @@ .. automethod:: set_default_permission + .. automethod:: set_session_factory + .. automethod:: set_request_factory .. automethod:: set_renderer_globals_factory -- cgit v1.2.3 From 04ebd572a92f6681209c70c42192775c63cd16cd Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 28 Oct 2010 22:40:16 -0400 Subject: sessioning docs --- docs/api/interfaces.rst | 4 ++++ docs/api/request.rst | 8 ++++++++ docs/api/session.rst | 9 +++++++++ 3 files changed, 21 insertions(+) create mode 100644 docs/api/session.rst (limited to 'docs/api') diff --git a/docs/api/interfaces.rst b/docs/api/interfaces.rst index 7193fd11b..2bf55474e 100644 --- a/docs/api/interfaces.rst +++ b/docs/api/interfaces.rst @@ -25,3 +25,7 @@ Other Interfaces .. autointerface:: IRoutePregenerator + .. autointerface:: ISession + + .. autointerface:: ISessionFactory + diff --git a/docs/api/request.rst b/docs/api/request.rst index e53028b0f..9e851ba8d 100644 --- a/docs/api/request.rst +++ b/docs/api/request.rst @@ -85,3 +85,11 @@ of ``request.exception`` will be ``None`` within response and finished callbacks. + .. attribute:: session + + If a :term:`session factory` has been configured, this attribute + will represent the current user's :term:`session` object. If a + session factory *has not* been configured, requesting the + ``request.session`` attribute will cause a + :class:`pyramid.exceptions.ConfigurationError` to be raised. + diff --git a/docs/api/session.rst b/docs/api/session.rst new file mode 100644 index 000000000..daed9fc33 --- /dev/null +++ b/docs/api/session.rst @@ -0,0 +1,9 @@ +.. _session_module: + +:mod:`pyramid.session` +--------------------------- + +.. automodule:: pyramid.session + + .. autofunction:: InsecureCookieSessionFactoryConfig + -- cgit v1.2.3