merge
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 10 Aug 2009 09:13:43 +0200
changeset 2751 5b0993df7c8a
parent 2750 d0cd7f7c6d21 (current diff)
parent 2748 d2fcf19bfb34 (diff)
child 2752 28783f51df10
merge
--- a/common/mixins.py	Mon Aug 10 09:12:22 2009 +0200
+++ b/common/mixins.py	Mon Aug 10 09:13:43 2009 +0200
@@ -365,6 +365,7 @@
 
 class ProgressMixIn(object):
     """provide default implementations for IProgress interface methods"""
+    # This is an adapter isn't it ?
 
     @property
     def cost(self):
--- a/web/views/startup.py	Mon Aug 10 09:12:22 2009 +0200
+++ b/web/views/startup.py	Mon Aug 10 09:13:43 2009 +0200
@@ -156,3 +156,19 @@
     def display_folders(self):
         return 'Folder' in self.schema and self.req.execute('Any COUNT(X) WHERE X is Folder')[0][0]
 
+
+class RegistryView(StartupView):
+    id = 'registry'
+    title = _('registry')
+
+    def call(self, **kwargs):
+        """The default view representing the instance's management"""
+        self.w(u'<h1>%s</h1>' % _("Registry's content"))
+        keys = sorted(self.vreg)
+        self.w(u'<p>%s</p>' % ' - '.join('<a href="/_registry#%s">%s</a>' % (key, key) for key in keys))
+        for key in keys:
+            self.w(u'<a name="%s"><h2>%s</h2></a><table>' % (key,key))
+            for key, value in sorted(self.vreg[key].items()):
+                self.w(u'<tr><td>%s</td><td>%s</td></tr>' % (key, xml_escape(repr(value))))
+            self.w(u'</table>')
+
--- a/web/views/urlrewrite.py	Mon Aug 10 09:12:22 2009 +0200
+++ b/web/views/urlrewrite.py	Mon Aug 10 09:13:43 2009 +0200
@@ -70,6 +70,9 @@
     id = 'simple'
 
     rules = [
+        ('/_', dict(vid='manage')),
+        ('/_registry', dict(vid='registry')),
+#        (rgx('/_([^/]+?)/?'), dict(vid=r'\1')),
         ('/schema',  dict(vid='schema')),
         ('/index', dict(vid='index')),
         ('/myprefs', dict(vid='propertiesform')),