Well ... it works ! but not if i do:
class Dates(SQLObject):
start_date = DateCol()
date_between = DateCol()
finish_date = DateCol()
def _set_start_date(self, value):
if self.finish_date < value:
value = datetime.date.min
self._SO_set_finish_date(value)
def _set_between_date(self, value):
if self.start_date >= value:
value = datetime.date.today()
self._SO_set_between_date(value)
Its curious .. if I comment the whole _set_between_date function it works but
with this i get the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File
"/usr/lib/python2.4/site-packages/SQLObject-0.7.0-py2.4.egg/sqlobject/main.py",
line 1183, in __init__
self._create(id, **kw)
File
"/usr/lib/python2.4/site-packages/SQLObject-0.7.0-py2.4.egg/sqlobject/main.py",
line 1207, in _create
self.set(**kw)
File
"/usr/lib/python2.4/site-packages/SQLObject-0.7.0-py2.4.egg/sqlobject/main.py",
line 1084, in set
raise AttributeError, '%s (with attribute %r)' % (e, name)
AttributeError: 'Dates' object has no attribute 'id' (with attribute
'start_date')
On Tue, 16 May 2006 21:17:46 +0400
Oleg Broytmann <[EMAIL PROTECTED]> wrote:
> [email protected]
-------------------------------------------------------
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
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss