[silva.ui][Sylvain Viollon] Use new API.

[email protected]
Newsgroups gmane.comp.web.zope.silva.cvs
Message-ID <[email protected]>
author:    Sylvain Viollon
date:      Mon Aug 19 15:12:35 2013 +0200
revision:  648:9db2590b6022 in silva.ui
branch:    
details:   https://hg.infrae.com/silva.ui?cmd=changeset;node=9db2590b6022
modified:  src/silva/ui/rest/helper.py
added:     
removed:   
log:       Use new API.


diffstat:

 src/silva/ui/rest/helper.py |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r bfdc11b64d50 -r 9db2590b6022 src/silva/ui/rest/helper.py
--- a/src/silva/ui/rest/helper.py	Fri Aug 16 14:06:56 2013 +0200
+++ b/src/silva/ui/rest/helper.py	Mon Aug 19 15:12:35 2013 +0200
@@ -14,8 +14,7 @@
 from zope.interface import Interface
 from zope.publisher.interfaces.browser import IDefaultBrowserLayer
 
-import fanstatic
-
+from silva.fanstatic import get_inclusion, get_needed
 from silva.core.messages.interfaces import IMessageService
 from silva.core.views.interfaces import IVirtualSite, IContentURL
 from silva.core.references.utils import relative_path
@@ -123,13 +122,13 @@
         self.request = request
 
     def __call__(self, screen, data):
-        needed = fanstatic.get_needed()
+        needed = get_needed()
         if not needed.has_resources():
             return
         if not needed.has_base_url():
             needed.set_base_url(screen.root_url)
         urls = defaultdict(list)
-        for resource in fanstatic.Inclusion(needed).resources:
+        for resource in get_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.