Author: jmorliaguet
Date: Sun Apr 23 18:35:16 2006
New Revision: 2953

Modified:
   cpsskins/branches/paris-sprint-2006/ui/screens/sitemanager/views.py
Log:

- fixes and added a docstring for zope2



Modified: cpsskins/branches/paris-sprint-2006/ui/screens/sitemanager/views.py
==============================================================================
--- cpsskins/branches/paris-sprint-2006/ui/screens/sitemanager/views.py 
(original)
+++ cpsskins/branches/paris-sprint-2006/ui/screens/sitemanager/views.py Sun Apr 
23 18:35:16 2006
@@ -42,6 +42,7 @@
 """
 
 class SiteDesignerView:
+    """Site designer view"""
 
     def __init__(self, context, request):
         self.context = context
@@ -119,7 +120,9 @@
         context = self.context
         request = self.request
 
-        settings = getUtility(ISettings, context=context)
+        mgr = getThemeManager(context)
+        settings = mgr.getSettings()
+
         exporter = getMultiAdapter((settings, request), IDataExporter)
         return exporter()
 
@@ -130,7 +133,7 @@
         request = self.request
 
         mgr = getThemeManager(context)
-        settings = getUtility(ISettings, context=context)
+        settings = mgr.getSettings()
 
         dom = parseString(xml)
         importer = getMultiAdapter((mgr, request), IDataImporter, 
@@ -261,7 +264,7 @@
         xml = u''
         for theme in getThemeManager(context).getThemes():
             exporter = getMultiAdapter((theme, request), IDataExporter)
-            xml += exporter().replace('<?xml version="1.0"?>', '')
+            xml += exporter().replace(u'<?xml version="1.0"?>', u'')
 
         return themes_xml % {'content': xml}
 
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to