[Grok-dev] Grok & Annoying time problem

Sascha Boch sascha.boch at gmx.de
Tue Aug 10 03:05:01 EDT 2010


I think the problem is that the code that sets up the widgets is only executed when the server starts. From that point on, they remain static until the next restart. 

What you want is to define a constraint on the field like this:

def check_date(value):
  return value < datetime.date.today()


currentdate = zope.schema.Date(
                      title=  u'currentdate',
                      constraint = check_date,

HTH,
Sascha
-- 
GMX DSL SOMMER-SPECIAL: Surf & Phone Flat 16.000 für nur 19,99 ¿/mtl.!*
http://portal.gmx.net/de/go/dsl


More information about the Grok-dev mailing list