Permalink
Browse files

stamp out inappropriate use of get_settings

  • Loading branch information...
1 parent a1365e6 commit 265ea8bcdd0c03fbce21fe969d11cb4ab4177ffa @mcdonc mcdonc committed Nov 11, 2010
Showing with 3 additions and 5 deletions.
  1. +2 −3 TODO.txt
  2. +1 −2 pyramid/i18n.py
View
@@ -116,9 +116,8 @@
chameleon_text.TextTemplateRenderer.template (also uses get_settings),
chameleon_zpt.ZPTTemplateRenderer.template (also uses get_settings),
resource.OverrideProvider._get_overrides, traversal.traverse,
- Configurator.add_translation_dirs (get_current_request),
- i18n.negotiate_locale_name (get_settings). All ZCML directives use
- ``get_current_registry`` to obtain the registry.
+ Configurator.add_translation_dirs (get_current_request). All ZCML
+ directives use ``get_current_registry`` to obtain the registry.
- Add deprecation warnings for:
View
@@ -13,7 +13,6 @@
from pyramid.interfaces import ITranslationDirectories
from pyramid.interfaces import ILocaleNegotiator
-from pyramid.settings import get_settings
from pyramid.threadlocal import get_current_registry
class Localizer(object):
@@ -132,7 +131,7 @@ def negotiate_locale_name(request):
locale_name = negotiator(request)
if locale_name is None:
- settings = get_settings() or {}
+ settings = registry.settings or {}
locale_name = settings.get('default_locale_name', 'en')
return locale_name

0 comments on commit 265ea8b

Please sign in to comment.