From b68aadc3867a95a6376bb2157cc93210eb62a104 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 16 Nov 2010 20:31:04 -0500 Subject: - The ``pyramid.settings.get_settings`` API is now deprecated. Use ``pyramid.threadlocals.get_registry().settings`` instead or use the ``settings`` attribute of the registry available from the request (``request.registry.settings``). --- docs/narr/i18n.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'docs/narr/i18n.rst') diff --git a/docs/narr/i18n.rst b/docs/narr/i18n.rst index 703883fb2..9e2071872 100644 --- a/docs/narr/i18n.rst +++ b/docs/narr/i18n.rst @@ -773,8 +773,8 @@ If this setting is supplied within the :app:`Pyramid` application .. code-block:: python :linenos: - from pyramid.setttings import get_settings - settings = get_settings() + from pyramid.threadlocal import get_current_registry + settings = get_current_registry().settings default_locale_name = settings['default_locale_name'] "Detecting" Available Languages @@ -822,8 +822,9 @@ Then as a part of the code of a custom :term:`locale negotiator`: .. code-block:: py - from pyramid.settings import get_settings - languages = get_settings()['available_languages'].split() + from pyramid.threadlocal import get_current_registry + settings = get_current_registry().settings + languages = settings['available_languages'].split() This is only a suggestion. You can create your own "available languages" configuration scheme as necessary. -- cgit v1.2.3