Change
if form.process().accepted:
form.vars.PostDate = request.vars.PostDate
response.flash = T("Thank you!")
to
if form.process(keepvalues = True).accepted:
response.flash = T("Thank you!")
2017-01-20 4:02 GMT-02:00 Armando Hernandez <
armando.hernandez.ma...@g
Assuming PostDate is a field of type datetime Try this before calling SQLFORM
db.QuarterMaster.PostDate.default = request.now
If PostDate is a field of type date use
db.QuarterMaster.PostDate.default = request.now.date()
and remove all the
form.vars.PostDate assignments
--
Resources:
- http:
I have a straight-forward controller function for entering the primary data:
def index():
"""
"""
response.flash = T("Hello World")
form = SQLFORM(db.QuarterMaster)
form.vars.PostDate = str(request.now.year) + "-" + str(request.now.month
) + "-" + str(request.now.day)
if f
3 matches
Mail list logo