def addcompany(): form = RegisterForm() if form.validate_on_submit(): form.create_user(True) #企业用户创建时需要为role送入ROLE_COMPANY flash('企业用户创建成功', 'success') return redirect(url_for('admin.users')) return render_template('admin/create_company.html', form=form)
def userregister(): form = RegisterForm() if form.validate_on_submit(): form.create_user() flash('Register success,please login!', 'success') return redirect(url_for('.login')) return render_template('userregister.html', form=form)
def create_user(): form = RegisterForm() if form.validate_on_submit(): form.createUser(role=UserRole.USER.value) flash('求职者创建成功', 'success') return redirect(url_for('admin.users')) return render_template('admin/create_user.html', form=form)
def register(): form = RegisterForm() if form.validate_on_submit(): form.create_user() flash('注册成功,请登录!', 'success') return redirect(url_for('.login')) return render_template('register.html', form=form)
def userregister(): form = RegisterForm() if form.validate_on_submit(): form.create_user() flash('注册成功,请登录!', 'success') return redirect(url_for('.login')) return render_template('userregister.html', form=form)
def create_user(): form = RegisterForm() if form.is_submitted(): form.create_user() flash('求职者创建成功', 'success') return redirect(url_for('admin.users')) return render_template('admin/create_user.html', form=form)
def register_company(): form = RegisterForm() if form.validate_on_submit(): form.create_user(20) flash('注册成功', 'success') return redirect(url_for('front.login')) return render_template('register_company.html', form=form)
def company_register(): form = RegisterForm() if form.validate_on_submit(): form.create_user(20) flash('Company register success', 'success') return redirect(url_for('.login')) return render_template("reg_company.html", form=form)
def create_user(): form = RegisterForm() if form.is_submitted(): form.create_user() flash('求职者创建成功', 'success') return redirect(url_for('admin.users')) return render_template('admin/create_user.html', form=form)
def corpregister(): form = RegisterForm() if form.validate_on_submit(): form.create_company() flash('Register Success', 'success') return redirect(url_for('.login')) return render_template('corp_register.html', form=form)
def adduser(): form = RegisterForm() if form.validate_on_submit(): form.create_user() #默认创建普通求职者用户 flash('求职者用户创建成功', 'success') return redirect(url_for('admin.users')) return render_template('admin/create_user.html', form=form)
def personalregister(): form = RegisterForm() if form.validate_on_submit(): form.create_user() # create_user()函数包含session.add() flash('用户注册成功,请登录', 'success') # 增加flash展示 return redirect(url_for('front.login')) return render_template('personalregister.html', form=form)
def jobseeker_register(): form = RegisterForm() if form.validate_on_submit(): form.create_user(10) flash('Jobseeket register success', 'success') return redirect(url_for('.login')) return render_template("reg_jobseeker.html", form=form)
def company_register(): form = RegisterForm() if form.validate_on_submit(): form.create_user(True) #企业用户创建时需要为role送入ROLE_COMPANY flash('企业用户注册成功,请登录!', 'success') return redirect(url_for('.login')) return render_template('company_register.html', form=form)
def create_user(): form = RegisterForm() if form.validate_on_submit(): form.create_user() flash('创建用户成功', 'success') return redirect(url_for('admin.user')) return render_template('admin/create_user.html', form=form)
def create_company(): form = RegisterForm() form.name.label = u'企业名称' if form.validate_on_submit(): form.create_user() flash('企业创建成功', 'success') return redirect(url_for('admin.users')) return render_template('admin/create_company.html', form=form)
def addcompany(): form = RegisterForm() if form.validate_on_submit(): form.create_company() flash('新增企业成功', 'success') return redirect(url_for('admin.users')) return render_template('admin/add_company.html', form=form)
def company_register(): form = RegisterForm() form.username.label.text = '企业名' if form.validate_on_submit(): form.create_user(20) flash('企业注册成功,请完善信息!', 'success') return render_template('login.html') return render_template('company_register.html', form=form)
def user_register(): form = RegisterForm() if form.validate_on_submit(): form.create_user(30) flash('用户注册成功,请完善信息!', 'success') return render_template('login.html') return render_template('user_register.html', form=form)
def company_register(): form = RegisterForm() form.username.label = u'企业名称' if form.validate_on_submit(): form.create_user(User(role=User.ROLE_COMPANY)) flash('企业注册成功,请登录!', 'success') return redirect(url_for('.login')) return render_template('company_register.html', form=form)
def create_company(): form = RegisterForm() form.name.label = u'企业名称' if form.validate_on_submit(): form.create_user() flash('企业创建成功', 'success') return redirect(url_for('admin.users')) return render_template('admin/create_company.html', form=form)
def edit_user(user_id): user = User.query.get_or_404(user_id) form = RegisterForm(obj=user) if form.validate_on_submit(): form.update_user(user) flash('用户更新成功', 'success') return redirect(url_for('admin.user')) return render_template('admin/edit_user.html', form=form, user=user)
def companyregister(): form = RegisterForm() form.name.label = "企业注册" if form.validate_on_submit(): form.createUser(role=UserRole.COMPANY) flash('注册成功, 请先登录', 'success') return redirect(url_for('front.login')) return render_template('companyregister.html', form=form)
def register_boss(): form = RegisterForm() form.username.label = "企业名称" if form.validate_on_submit(): form.create_boss() flash('注册成功,请登录!', 'success') return redirect(url_for('.login')) return render_template('company_register.html', form=form)
def companyregister(): form = RegisterForm() if form.validate_on_submit(): company = form.create_user() company.role = User.ROLE_COMPANY # 设置成公司用户 db.session.add(company) # 提交到Company表 db.session.commit() return redirect(url_for('front.login')) return render_template('companyregister.html', form=form)
def userregister(): form = RegisterForm() if form.validate_on_submit(): if not form.username.data.isalnum(): flash('用户名只支持数字和字母', 'danger') else: form.create_user() flash('注册成功,请登录', 'success') return redirect(url_for('front.login')) return render_template('userregister.html', form=form)
def companyregister(): form = RegisterForm() if form.validate_on_submit(): company_user = form.create_user() company_user.role = User.ROLE_COMPANY db.session.add(company_user) db.session.commit() flash('注册成功,请登录!', 'success') return redirect(url_for('.login')) return render_template('front/companyregister.html', form=form)
def companyregister(): form = RegisterForm() form.name.label = u'企业名称' if form.validate_on_submit(): company_user = form.create_user() company_user.role = User.ROLE_COMPANY db.session.add(company_user) db.session.commit() flash('注册成功,请登录!', 'success') return redirect(url_for('.login')) return render_template('companyregister.html', form=form)
def companyregister(): form = RegisterForm() form.name.label = u'企业名称' if form.validate_on_submit(): company = form.create_user() company.role = User.ROLE_COMPANY # 设置成公司用户 db.session.add(company) # 提交到Company表 db.session.commit() flash('用户注册成功,请登录', 'success') # 增加flash展示 return redirect(url_for('front.login')) return render_template('companyregister.html', form=form)
def Comregister(): form = RegisterForm() form.username.label = u'企业名称' if form.validate_on_submit(): company_user = form.create_user() company_user.role = User.ROLE_Company db.session.add(company_user) db.session.commit() flash('注册成功,清登录', 'success') return redirect(url_for('.login')) return render_template('comregister.html', form=form)
def userregister(): """ 用户注册 """ form = RegisterForm() post_url = url_for("front.userregister") if form.validate_on_submit(): form.create_user() flash('注册成功,请登录!', 'success') return redirect(url_for('.login')) return render_template('register.html', form=form, post_url=post_url, topic="用户注册")
def companyregister(): form = RegisterForm() form.name.label = u'企业名称' if form.validate_on_submit(): user = form.create_user() user.role = User.ROLE_COMPANY db.session.add(user) db.session.commit() flash('公司注册成功,请登录。', 'success') return redirect(url_for('.login')) return render_template('companyregister.html', form=form)
def companyregister(): form = RegisterForm() form.name.label = 'CompanyName' if form.validate_on_submit(): company_user = form.create_user() company_user.role = User.ROLE_COMPANY db.session.add(company_user) db.session.commit() flash('register success', 'sucess') return redirect(url_for('.login')) return render_template('companyregister.html', form=form)
def create_company(): form = RegisterForm() form.name.label.text = '公司名称' if form.validate_on_submit(): user = form.create_user() user.role = User.ROLE_COMPANY db.session.add(user) db.session.commit() flash('创建公司成功', 'success') return redirect(url_for('admin.users')) return render_template('admin/create_company.html', form=form)