[Checkins] SVN: hurry.yui/trunk/src/hurry/yui/README.txt Update to latest hurry.resource.

Martijn Faassen faassen at infrae.com
Tue Oct 7 10:54:26 EDT 2008


Log message for revision 91850:
  Update to latest hurry.resource.
  

Changed:
  U   hurry.yui/trunk/src/hurry/yui/README.txt

-=-
Modified: hurry.yui/trunk/src/hurry/yui/README.txt
===================================================================
--- hurry.yui/trunk/src/hurry/yui/README.txt	2008-10-07 14:48:13 UTC (rev 91849)
+++ hurry.yui/trunk/src/hurry/yui/README.txt	2008-10-07 14:54:26 UTC (rev 91850)
@@ -11,13 +11,16 @@
 Let's set up a way to render URLs; typically the framework has already
 done this::
 
-  >>> def get_inclusion_url(inclusion):
-  ...    return 'http://localhost/static/%s/%s' % (
-  ...      inclusion.library.name, inclusion.relpath)
-  >>> from hurry.resource.interfaces import IInclusionUrl
+  >>> def get_library_url(library):
+  ...    return 'http://localhost/static/%s' % (
+  ...      library.name)
+  >>> from hurry.resource import Library
+  >>> from hurry.resource.interfaces import ILibraryUrl
   >>> from zope import component
-  >>> component.provideUtility(get_inclusion_url, 
-  ...     IInclusionUrl)
+  >>> component.provideAdapter(
+  ...     factory=get_library_url, 
+  ...     adapts=(Library,),
+  ...     provides=ILibraryUrl)
 
 
 Let's check the YUI structure by picking out a resource in it::



More information about the Checkins mailing list