Thanks, Bernhard.
The solution I ended up with is quite messy, but it does work:
# Set defaults
if request.get_vars:
filter_bar.vars.from_date = datetime.datetime.strptime(
request.get_vars.from_date, "%Y-%m-%d").date()
filter_bar.vars.to_date =
Might not be the most efficient, but if you put the from date and to date
as arguments and then redirect in the form.accepts:
if form.accepts(request,session):
#calculate the new dates...
session.flash='Updated date range'
redirect(URL('report',args=[from_date,to_date]))
--
2 matches
Mail list logo