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 form.process().accepted:
form.vars.PostDate = request.vars.PostDate
response.flash = T("Thank you!")
elif form.errors:
response.flash = T("Please correct the errors in the form")
else:
response.flash = T("Please fill out the form")
return dict(form=form)
form = SQLFORM(db.QuarterMaster)
if request.vars.PostDate:Maybe replace the top part with?if request.vars.PostDate:
form = SQLFORM(db.QuarterMaster)
form.vars.PostDate = request.vars.PostDate
else:
form.vars.PostDate = str(request.now.year) + "-" + str(request.now.month) + "-" + str(request.now.day)
if form.process().accepted:
# here was form.vars.PostDate = request.vars.PostDate
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Dave, maybe next time you write a less generic "Subject"It would be easier to find it.Regards
2017-01-16 20:06 GMT+00:00 Dave S <snide...@gmail.com>:
On Tuesday, January 10, 2017 at 11:34:48 PM UTC-8, Dave S wrote:On Tuesday, January 10, 2017 at 3:04:13 PM UTC-8, Dave S wrote:Maybe replace the top part with?if request.vars.PostDate:
form = SQLFORM(db.QuarterMaster)
form.vars.PostDate = request.vars.PostDate
else:
form.vars.PostDate = str(request.now.year) + "-" + str(request.now.month) + "-" + str(request.now.day)
if form.process().accepted:
# here was form.vars.PostDate = request.vars.PostDateNope.My turn to wonder if someone has more of clue than I do./dps
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscribe@googlegroups.com.