Author: jmorliaguet
Date: Wed Dec  7 23:53:43 2005
New Revision: 1983

Modified:
   cpsskins/branches/jmo-perspectives/perspectives/perspective.py
   cpsskins/branches/jmo-perspectives/profiles/default/__init__.py
   cpsskins/branches/jmo-perspectives/setup/registration.py
Log:

- path fix during registration



Modified: cpsskins/branches/jmo-perspectives/perspectives/perspective.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/perspectives/perspective.py      
(original)
+++ cpsskins/branches/jmo-perspectives/perspectives/perspective.py      Wed Dec 
 7 23:53:43 2005
@@ -17,6 +17,8 @@
 """
 __docformat__ = "reStructuredText"
 
+from xml.dom.minidom import parseString
+
 from zope.app.publisher.browser import BrowserView
 from zope.component import adapts
 from zope.component.interfaces import IFactory

Modified: cpsskins/branches/jmo-perspectives/profiles/default/__init__.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/profiles/default/__init__.py     
(original)
+++ cpsskins/branches/jmo-perspectives/profiles/default/__init__.py     Wed Dec 
 7 23:53:43 2005
@@ -17,7 +17,6 @@
 """
 __docformat__ = "reStructuredText"
 
-
 from cpsskins.setup.registration import register
 
-register("perspectives.xml")
+register('default', 'perspectives.xml')

Modified: cpsskins/branches/jmo-perspectives/setup/registration.py
==============================================================================
--- cpsskins/branches/jmo-perspectives/setup/registration.py    (original)
+++ cpsskins/branches/jmo-perspectives/setup/registration.py    Wed Dec  7 
23:53:43 2005
@@ -17,17 +17,32 @@
 """
 __docformat__ = "reStructuredText"
 
+import os
+import sys
 import logging
 
+from xml.dom.minidom import parseString
+
 DEBUG = logging.DEBUG
 logger = logging.getLogger()
 
 settings = []
 
-def register(file):
-    """ """
-    settings.append(file)
+def base_path():
+    filename = sys.modules['cpsskins.profiles'].__file__
+    return os.path.dirname(filename)
+
+def register(profile, file):
+    settings.append(os.path.join(base_path(), profile, file))
 
 def loadSettings(event):
-    for file in settings:
+    for setting in settings:
         logger.log(DEBUG, "cpsskins loaded setting: %s" % file)
+
+        f = open(setting)
+        xml = f.read()
+        f.close()
+
+        dom = parseString(xml)
+        print xml
+
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to