On Friday 27 August 2010 4:15:17 pm Bruno Rocha wrote:
> I dont know if I understand clearly what you want, but..
>
>
> May be :
>
> def get_sql_date():
>    return db.executesql('select CURRENT_DATE')
>
> Field('grade_date','date',compute=get_sql_date,required=True,notnull=True)
>
> or
>
> Field('grade_date','date',default=request.now.date().strftime('%Y-%m-%d'),r
>equired=True,notnull=True)
>
>

Thanks but that attacks the problem from the client end of things, not the 
database. What I am looking for is a way to supply database specific variables 
to the table creation process. I would like to end up with the field in the 
database having the definition:

grade_date DATE NOT NULL DEFAULT CURRENT_DATE

This would make the DEFAULT have meaning outside of the framework.



-- 
Adrian Klaver
[email protected]

Reply via email to