Skip to content.

Etria Lists

 

[quills-dev] [Collective-checkins] r32308 - Quills/trunk/browser

quills-dev at lists.etria.com quills-dev at lists.etria.com
Wed Oct 25 15:04:30 UTC 2006


Author: tomster
Date: Wed Oct 25 15:04:29 2006
New Revision: 32308

Added:
   Quills/trunk/browser/QuillsBaseView.py
Log:
Added Base Viewclass in preparation for migrating `manage_comments` (or other templates!) to using Five views.

Added: Quills/trunk/browser/QuillsBaseView.py
==============================================================================
--- (empty file)
+++ Quills/trunk/browser/QuillsBaseView.py	Wed Oct 25 15:04:29 2006
@@ -0,0 +1,19 @@
+from Products.Five import BrowserView
+from Products.CMFCore.utils import getToolByName
+    
+class QuillsBaseView(BrowserView):
+    """ Common base class for all Quills view classes. 
+    """
+    def __init__(self, context, request):
+        super(QuillsBaseView, self).__init__(context, request)
+        self.quills_tool = getToolByName(context, 'quills_tool')
+
+    def test(self, value, trueVal, falseVal):
+        """
+            helper method, mainly for setting html attributes.
+        """
+        if value:
+            return trueVal
+        else:
+            return falseVal
+

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Collective-checkins mailing list
Collective-checkins at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/collective-checkins



More information about the quills-dev mailing list