Пример #1
0
def addjob():
    form = AddJobForm()
    if form.validate_on_submit():
        form.create_job(company=current_user)
        flash('职位添加成功','success')
        return redirect(url_for('job.admin'))
    return render_template('job/addjob.html', form=form)
Пример #2
0
def job_add():
    form = AddJobForm()
    if form.validate_on_submit():
        form.create_job()
        return redirect(url_for('.jobs'))
    return render_template('admin/add_job.html', form=form)