def post_dt_end(request, dt_start): if request.forms.get('dt_end') == '': dt_end = dt_start + config.DT_QUERY else: dt_end = query.parse_form_dt(request.forms.get('dt_end')) return dt_end
def post_dt_start(request): if request.forms.get('dt_start') == '': dt_start = datetime.datetime.now() - config.DT_QUERY else: dt_start = query.parse_form_dt(request.forms.get('dt_start')) return dt_start