[Checkins] SVN: Sandbox/ulif/grokintrospector/src/grok/admin/introspector/views.py Create an introspector skin to have our own 'namespace'.

Uli Fouquet uli at gnufix.de
Tue Jun 17 10:27:53 EDT 2008


Log message for revision 87460:
  Create an introspector skin to have our own 'namespace'.

Changed:
  A   Sandbox/ulif/grokintrospector/src/grok/admin/introspector/views.py

-=-
Added: Sandbox/ulif/grokintrospector/src/grok/admin/introspector/views.py
===================================================================
--- Sandbox/ulif/grokintrospector/src/grok/admin/introspector/views.py	                        (rev 0)
+++ Sandbox/ulif/grokintrospector/src/grok/admin/introspector/views.py	2008-06-17 14:27:53 UTC (rev 87460)
@@ -0,0 +1,44 @@
+##############################################################################
+#
+# Copyright (c) 2008 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""
+Views for the grok introspector.
+"""
+
+import grok
+from zope.app.basicskin import IBasicSkin
+from zope.app.folder.interfaces import IRootFolder
+
+# This will change after decoupling grok.admin from grok...
+grok.context(IRootFolder)
+
+class IntrospectorLayer(grok.IGrokLayer):
+    """A basic layer for all introspection stuff.
+    """
+    pass
+
+# This is the default layer for all views herein...
+grok.layer(IntrospectorLayer)
+
+class Introspector(grok.Skin):
+    """A skin for all introspection stuff.
+    """
+    grok.layer(IntrospectorLayer)
+
+class Index(grok.View):
+    """The overview page.
+    """
+    grok.name('index.html')
+
+    def render(self):
+        return "The Overview"



More information about the Checkins mailing list