def add_report() -> str: form = ReportForm(request.form) if form.validate() and lg.report(form): response = make_response(redirect(url_for('deck', deck_id=form.entry))) response.set_cookie('deck_id', form.entry) return response return report(form)
def report(form: Optional[ReportForm] = None) -> str: if form is None: form = ReportForm(request.form, request.cookies.get('deck_id', ''), auth.person_id()) view = Report(form, auth.person_id()) return view.page()
def report(form=None): if form is None: form = ReportForm(request.form, request.cookies.get('deck_id', '')) view = Report(form) return view.page()
def report(form: Optional[ReportForm] = None, deck_id: int = None) -> str: if form is None: form = ReportForm(request.form, deck_id, auth.person_id()) view = Report(form, auth.person_id()) return view.page()
def report(form=None): if form is None: form = ReportForm(request.form, request.cookies.get('deck_id', ''), auth.logged_person()) view = Report(form, auth.logged_person()) return view.page()