Roundup Tracker - Issues

Issue 901444

classification
Missing arg error from date local() method
Type: Severity: normal
Components: Web interface Versions:
process
Status: closed fixed
:
: richard : mdurbin, richard
Priority: normal :

Created on 2004-02-20 22:50 by mdurbin, last changed 2004-02-23 05:47 by richard.

Messages
msg1119 Author: [hidden] (mdurbin) Date: 2004-02-20 22:50
Tried to use python:msg.date.local(-6) to convert GMT 
to CST and got error indicating that __init_ required 7 
arguments and I was only providing 6. 

In cgi/templating.py, the local method of class  
DateHTMLProperty returns a DateHTMLProperty item 
whose argument is missing the _classname argument 
required of the HTMLProperty constructor. When I 
provide that arg the error goes away and the local() 
method works per documentation.

Here's the code:

######
# mdurbin hack
# this return is one-argument short for the 
HTMLProperty constructor,
# so I added classname and it works
#
#        return DateHTMLProperty(self._client, 
self._nodeid, self._prop,
#            self._formname, self._value.local(offset))
        return DateHTMLProperty(self._client, 
self._classname, self._nodeid, self._prop,
            self._formname, self._value.local(offset))



msg1120 Author: [hidden] (richard) Date: 2004-02-23 05:47
Logged In: YES 
user_id=6405

Fixed now() while I was at it. Thanks! 
 
History
Date User Action Args
2004-02-20 22:50:27mdurbincreate