[Checkins] SVN: hurry.zoperesource/trunk/ Register the ILibraryUrl adapter for ILibrary instead of Library,

Vincent Fretin vincent.fretin at gmail.com
Sat Jul 3 16:12:25 EDT 2010


Log message for revision 114151:
  Register the ILibraryUrl adapter for ILibrary instead of Library,
  to be less specific for the adapter lookup.
  

Changed:
  U   hurry.zoperesource/trunk/CHANGES.txt
  U   hurry.zoperesource/trunk/src/hurry/zoperesource/zopesupport.py

-=-
Modified: hurry.zoperesource/trunk/CHANGES.txt
===================================================================
--- hurry.zoperesource/trunk/CHANGES.txt	2010-07-03 20:06:16 UTC (rev 114150)
+++ hurry.zoperesource/trunk/CHANGES.txt	2010-07-03 20:12:25 UTC (rev 114151)
@@ -4,6 +4,9 @@
 0.5 (unreleased)
 ================
 
+* Register the ILibraryUrl adapter for ILibrary instead of Library,
+  to be less specific for the adapter lookup.
+
 * Clearly specify license as ZPL.
 
 0.4 (2009-12-16)

Modified: hurry.zoperesource/trunk/src/hurry/zoperesource/zopesupport.py
===================================================================
--- hurry.zoperesource/trunk/src/hurry/zoperesource/zopesupport.py	2010-07-03 20:06:16 UTC (rev 114150)
+++ hurry.zoperesource/trunk/src/hurry/zoperesource/zopesupport.py	2010-07-03 20:12:25 UTC (rev 114151)
@@ -10,8 +10,9 @@
 from zope.publisher.browser import BrowserRequest, BrowserResponse, isHTML
 from zope.app.publication.interfaces import IBrowserRequestFactory
 
-from hurry.resource import NeededInclusions, Library, render_topbottom_into_html
-from hurry.resource.interfaces import ICurrentNeededInclusions, ILibraryUrl
+from hurry.resource import NeededInclusions, render_topbottom_into_html
+from hurry.resource.interfaces import (
+    ICurrentNeededInclusions, ILibrary, ILibraryUrl)
 
 class CurrentNeededInclusions(grok.GlobalUtility):
     grok.implements(ICurrentNeededInclusions)
@@ -32,7 +33,7 @@
             request.hurry_resource_needed = NeededInclusions()
         return request.hurry_resource_needed
 
- at grok.adapter(Library)
+ at grok.adapter(ILibrary)
 @grok.implementer(ILibraryUrl)
 def library_url(library):
     request = getRequest()



More information about the checkins mailing list