Exemplo n.º 1
0
def user_register():
    form = UserRegisterForm()
    if form.validate_on_submit():
        form.create_user()
        flash(u"注册成功", 'success')
        return redirect(url_for('front.index'))
    return render_template('user_register.html', form=form)
Exemplo n.º 2
0
def create_user():
    form = UserRegisterForm()
    if form.validate_on_submit():
        form.create_user()
        flash('create user success', 'success')
        return redirect(url_for('admin.users'))
    return render_template('admin/create_user.html', form=form)
Exemplo n.º 3
0
def userregister():
    form = UserRegisterForm()
    if form.validate_on_submit():
        form.create_user()
        flash('注册成功,请登录!', 'success')
        return redirect(url_for('.login'))
    return render_template('userregister.html', form=form)
Exemplo n.º 4
0
def create_user():
    form = UserRegisterForm()
    if form.is_submitted():
        form.create_user()
        flash('求职者创建成功', 'success')
        return redirect(url_for('admin.users'))
    return render_template('admin/create_user.html', form=form)
Exemplo n.º 5
0
def user_register():
    form = UserRegisterForm()
    if form.validate_on_submit():
        form.create_user()
        flash("Success!", 'success')
        return redirect(url_for('.login'))
    return render_template('user_register.html', form  = form)
Exemplo n.º 6
0
def register():
#包括用户注册和公司注册
    user_form=UserRegisterForm()
#    company_form=CompanyRegisterForm()
    if user_form.validate_on_submit():
        user_form.create_user()
        flash('注册成功,请登录!','success')
        return redirect(url_for('.login'))
Exemplo n.º 7
0
def create_company():
    form = UserRegisterForm()
    if form.validate_on_submit():
        u = form.create_user()
        u.role = User.ROLE_COMPANY
        db.session.add(u)
        db.session.commit()
        flash('create company success', 'success')
        return redirect(url_for('admin.users'))
    return render_template('admin/create_company.html', form=form)
Exemplo n.º 8
0
def companyregister():
    form=UserRegisterForm()
    if form.validate_on_submit():
        u=form.create_user()
        u.role=User.ROLE_COMPANY
        db.session.add(u)
        db.session.commit()      
        flash('Register success,Please Login','success')
        return redirect(url_for('front.login'))
    return render_template('companyregister.html',form=form)