Piotr Chamera wrote:
I am new in zope (3.3) and schema and cant find how to calculate default
value for readonly schema field. I want to set current date as default
date for field (and show this in schema) - in schema I can set
"default = datetime.now()" but it evaluates once at zope startup, I need
it evaluated at attribute access time. How to do it?
I have no clue but what happens if you use "default = datetime.now"
aka without calling it. The rationale being if it's a callable
(or maybe a string representation of a callable) it gets invoked when
In Archetypes at least we have this pattern at places while for the
default we destinguish explicitly between a 'default' (value) and a
'default_method' (to be evaluated at run time).
Last time this came up here (which is quite a while ago) this was
not supported. Don't know if that changed.
Zope3-users mailing list