Every validator has a format field. For example IS_DATETIME(format='%Y-%m-%d %H:%M:%S').
To have a default for all of them it would have to be passed explicitly which is not practical. But It can be set after tha facts. For example:
No depends on whether the validator is a list or IS_NULL_OR(IS_DATETIME(...)) etc. the syntax could be different
db.TABLE.FIELD.requires.format = '%Y-%m-%d %H:%M:%S' (if requires=IS_DATETIME())
db.TABLE.FIELD.requires[0].format = '%Y-%m-%d %H:%M:%S' (if requires=[IS_DATETIME()])
db.TABLE.FIELD.requires.other.format = '%Y-%m-%d %H:%M:%S'(if requires=IS_NULL_OR(IS_DATETIME()))
One could make a function that takes DB, loops over all tables and fields and requires and sets them all for IS_DATE and IS_DATETIME objects.
This would happen only once after table definition at startup.
For example:
def set_format(db, format_date, format_datetime):
for table in db:
for field in table:
if fiel.type=="date' or field.type=''datetime':
requires = field.requires
if isinstance(requires, list) and len(requires)>0: requires= requires= requires[0]
if hasattr(requires,"other"): requires=requires.other
if isinstance(requires, IS_DATE): requires.format = format_date
if isinstance(requires, IS_DATETIME): requires.format = format_datetime
Maybe there is a better solution but this should work.
Massimo