# HG changeset patch # User Thierry Florac # Date 1544814302 -3600 # Node ID e6d3e3443b842ba1332102e6904a620a55bafc6a # Parent acf504fb959014e09d74005da998e43ecbc1171e Updated resources diff -r acf504fb9590 -r e6d3e3443b84 src/pyams_notify/resources.py --- a/src/pyams_notify/resources.py Wed Nov 21 09:44:32 2018 +0100 +++ b/src/pyams_notify/resources.py Fri Dec 14 20:05:02 2018 +0100 @@ -12,22 +12,16 @@ __docformat__ = 'restructuredtext' +from pyramid.interfaces import IRequest +from zope.interface import Interface -# import standard library - -# import interfaces +from pyams_notify.skin import pyams_notify from pyams_skin.interfaces.resources import IResources -from pyramid.interfaces import IRequest - -# import packages -from pyams_notify.skin import pyams_notify -from pyams_utils.adapter import adapter_config, ContextRequestViewAdapter -from zope.interface import Interface +from pyams_utils.adapter import ContextRequestViewAdapter, adapter_config @adapter_config(context=(Interface, IRequest, Interface), provides=IResources) class ResourcesAdapter(ContextRequestViewAdapter): """Get context resources""" - def get_resources(self): - pyams_notify.need() + resources = (pyams_notify,)