def create_live(): form = LiveForm() if form.validate_on_submit(): form.create_live() flash('直播创建成功', 'success') return redirect(url_for('live.manage')) return render_template('live/create_live.html', form=form)
def create_live(): form = LiveForm() if form.validate_on_submit(): form.create_live() flash('create success', 'success') return redirect(url_for('admin.lives')) return render_template('admin/create_live.html', form=form)
def create_live(): form = LiveForm() if form.validate_on_submit(): form.create_live() flash('直播创建成功', 'success') return redirect(url_for('admin.lives')) return render_template('admin/create_live.html', form=form)
def create_live(): form = LiveForm() if form.validate_on_submit(): form.create_live() flash("直播创建成功", "success") return redirect(url_for("admin.lives")) return render_template("admin/create_live.html", form=form)
def edit_live(live_id): live = Live.query.get_or_404(live_id) form = LiveForm(obj=live) if form.validate_on_submit(): form.update_live(live) flash('直播更新成功', 'success') return redirect(url_for('.lives')) return render_template('admin/edit_live.html', form=form, live=live)
def create_live(): form = LiveForm() if form.validate_on_submit(): form.create_live() flash('直播创建成功', 'success') return redirect(url_for('admin.lives')) for field in form: print(field, field.label, field.data) return render_template('admin/create_live.html', form=form)