[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/sqlscript/dtml.py Updated to reflect dtml changes

Jim Fulton jim at zope.com
Sat Jul 24 07:36:28 EDT 2004


Log message for revision 26750:
  Updated to reflect dtml changes
  


Changed:
  U   Zope3/trunk/src/zope/app/sqlscript/dtml.py


-=-
Modified: Zope3/trunk/src/zope/app/sqlscript/dtml.py
===================================================================
--- Zope3/trunk/src/zope/app/sqlscript/dtml.py	2004-07-24 06:10:42 UTC (rev 26749)
+++ Zope3/trunk/src/zope/app/sqlscript/dtml.py	2004-07-24 11:36:27 UTC (rev 26750)
@@ -40,10 +40,10 @@
             v = "''".join(v.split("\'"))
         return "'%s'" %v
 
-    def __init__(self, args):
+    def __init__(self, context, args):
         args = parse_params(args, name='', type=None, column=None,
                             multiple=1, optional=1, op=None)
-        self.__name__ = name_param(args, 'sqlvar')
+        self.__name__ = name_param(context, args, 'sqlvar')
         has_key=args.has_key
         if not has_key('type'):
             raise ParseError, ('the type attribute is required', 'sqltest')
@@ -141,7 +141,7 @@
     required = None
     where = None
 
-    def __init__(self, blocks):
+    def __init__(self, context, blocks):
         self.blocks = blocks
         tname, args, section = blocks[0]
         self.__name__ = "%s %s" % (tname, args)
@@ -192,10 +192,10 @@
             v = "''".join(v.split("\'"))
         return "'%s'" %v
 
-    def __init__(self, args):
+    def __init__(self, context, args):
         args = parse_params(args, name='', expr='', type=None, optional=1)
 
-        name, expr = name_param(args, 'sqlvar', 1)
+        name, expr = name_param(context, args, 'sqlvar', 1)
         if expr is None:
             expr = name
         else:
@@ -275,11 +275,8 @@
 class SQLDTML(HTML):
     __name__ = 'SQLDTML'
 
-    commands = {}
+    commands = HTML.commands.copy()
 
-    for k, v in HTML.commands.items():
-        commands[k]=v
-
     # add the new tags to the DTML
     commands['sqlvar' ] = SQLVar
     commands['sqltest'] = SQLTest



More information about the Zope3-Checkins mailing list