[silva.ui][Sylvain Viollon] Update to the latest unreleased and ...

[email protected]
Newsgroups gmane.comp.web.zope.silva.cvs
Message-ID <[email protected]>
author:    Sylvain Viollon
date:      Tue Jul 23 17:49:43 2013 +0200
revision:  640:d7253a4bc4e7 in silva.ui
branch:    
details:   https://hg.infrae.com/silva.ui?cmd=changeset;node=d7253a4bc4e7
modified:  src/silva/ui/rest/helper.py
added:     
removed:   
log:       Update to the latest unreleased and completely edge version of
	fanstatic.


diffstat:

 src/silva/ui/rest/helper.py |  12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)

diffs (29 lines):

diff -r 089134f8d2e4 -r d7253a4bc4e7 src/silva/ui/rest/helper.py
--- a/src/silva/ui/rest/helper.py	Tue Jul 23 17:14:56 2013 +0200
+++ b/src/silva/ui/rest/helper.py	Tue Jul 23 17:49:43 2013 +0200
@@ -15,7 +15,6 @@
 from zope.publisher.interfaces.browser import IDefaultBrowserLayer
 
 import fanstatic
-from fanstatic.core import bundle_resources
 
 from silva.core.messages.interfaces import IMessageService
 from silva.core.views.interfaces import IVirtualSite, IContentURL
@@ -130,15 +129,8 @@
         if not needed.has_base_url():
             needed.set_base_url(screen.root_url)
         urls = defaultdict(list)
-        cache = {}
-        resources = needed.resources()
-        if needed._bundle:
-            resources = bundle_resources(resources)
-        for resource in resources:
-            library = resource.library
-            library_url = cache.get(library.name)
-            if library_url is None:
-                library_url = cache[library.name] = needed.library_url(library)
+        for resource in fanstatic.Inclusion(needed).resources:
+            library_url = needed.library_url(resource.library)
             resource_url =  '/'.join((library_url, resource.relpath))
             urls[resource.ext[1:]].append(resource_url)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.