Skip to content
This repository has been archived by the owner on Aug 2, 2019. It is now read-only.

Commit

Permalink
Add daybed.plugins loading from config.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémy HUBSCHER committed Nov 26, 2014
1 parent 6850c76 commit 7445d88
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions daybed/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from pyramid.events import NewRequest
from pyramid.renderers import JSONP
from pyramid.authentication import BasicAuthAuthenticationPolicy
from pyramid.settings import aslist

from pyramid_hawkauth import HawkAuthenticationPolicy
from pyramid_multiauth import MultiAuthenticationPolicy
Expand Down Expand Up @@ -173,10 +174,10 @@ def attach_objects_to_request(event):
config.add_subscriber(attach_objects_to_request, NewRequest)

# Plugins
plugins = aslist(settings['daybed.plugins'])

try:
config.include("daybed_browserid")
except ImportError:
pass
for plugin in plugins:
print(plugin)
config.include(plugin)

return config.make_wsgi_app()

0 comments on commit 7445d88

Please sign in to comment.