def order_lunch(): form = forms.LunchOrderForm() if form.validate_on_submit(): models.LunchOrder.create(user=g.user._get_current_object(), date=form.date.data, order=form.order.data.strip()) return render_template('lunch.html', form=form)
def order_lunch(): form = forms.LunchOrderForm() if form.validate_on_submit(): models.LunchOrder.create(order=form.order.data, date=form.date.data, user=g.user._get_current_object()) return redirect(url_for('index')) return render_template('lunch.html', form=form)