I would like to run some regular reports based upon sqlmethods. The input to these are a mixture of normal values, and some tokenised values. I tried storing these in tiny tables, but it doesn't seem that tiny tables allow one to store tokens. If I specify the value as say, criteria:tokens, it gets changed to just criteria. Any suggestions as to how to store the input as tokens for my reports? -- Graham Chiu
The problem with the TinyTable and TinyTablePlus products is that they use the tokenize.py module which treats any field value as a possible Python expression. Since ":" is a special token in Python, it gets interpreted as such. One quick way to get around this is to quote your field value - "criteria:tokens" You may have to deal with the quotes later on, although I think they get stripped after the value survives the tokenize.py module. On Fri, Oct 13, 2000 at 08:08:34AM +1300, Graham Chiu wrote:
I would like to run some regular reports based upon sqlmethods. The input to these are a mixture of normal values, and some tokenised values.
I tried storing these in tiny tables, but it doesn't seem that tiny tables allow one to store tokens. If I specify the value as say, criteria:tokens, it gets changed to just criteria.
Any suggestions as to how to store the input as tokens for my reports?
-- Graham Chiu
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- ------------------------------------------------------ Andres Corrada-Emmanuel Email: andres@corrada.com ------------------------------------------------------
On Fri, 13 Oct 2000 19:40:08 -0400 andres@corrada.com wrote:
The problem with the TinyTable and TinyTablePlus products is that they use the tokenize.py module which treats any field value as a possible Python expression. Since ":" is a special token in Python, it gets interpreted as such. One quick way to get around this is to quote your field value -
"criteria:tokens"
Hi, I tried this, and the tinytables just discarded the column. As a temporary fix, I've just created a ZClass to hold the tokens. What I would like to do now is feed the tokens into a sqlmethod, which then populates a tinytable with new values. My zclass has a string attribute called p_tinytable which holds the name of the tinytable to be changed. However, if I call the function as follows: <dtml-with MyZClass> <dtml-call "p_tinytable.manage_editData(newData)"> </dtml-with> I get: Error Type: AttributeError Error Value: 'string' object has no attribute 'manage_editData' or <dtml-with MyZClass> <dtml-call "_[p_tinytable].manage_editData(newData)"> </dtml-with> I get: Error Type: AttributeError Error Value: manage_editData -- Graham Chiu
participants (2)
-
andresï¼ corrada.com -
Graham Chiu