Permalink
Browse files

settings > get_settings

  • Loading branch information...
1 parent 1d1020a commit ca92147435023f769aaa74cc88d02fbf3e47c8c3 @danjac danjac committed Mar 8, 2011
Showing with 5 additions and 2 deletions.
  1. +1 −2 pyramid_mailer/__init__.py
  2. +4 −0 pyramid_mailer/tests.py
@@ -17,11 +17,10 @@ def includeme(config):
:versionadded: 0.4
"""
- settings = config.settings
+ settings = config.get_settings()
prefix = settings.get('pyramid_mailer.prefix', 'mail.')
mailer = mailer_factory_from_settings(settings, prefix=prefix)
config.registry.registerUtility(mailer, IMailer)
- # mailer.registry = config.registry
def get_mailer(request):
View
@@ -586,6 +586,10 @@ def __init__(self, registry, settings):
self.registry = registry
self.settings = settings
+ def get_settings(self):
+ return self.settings
+
+
class DummyRegistry(object):
def __init__(self, result=None):
self.result = result

0 comments on commit ca92147

Please sign in to comment.