Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renamed the form Reg to RegistrationForm #45

Merged
merged 1 commit into from
Sep 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion resume/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from resume.models import UserModel
from flask_login import current_user

class Reg(FlaskForm):
class RegistrationForm(FlaskForm):
username = StringField('Username',
validators=[DataRequired(),Length(min=5,max=20)])
email = StringField('Email',
Expand Down
4 changes: 2 additions & 2 deletions resume/routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from flask import Flask,make_response,render_template,url_for,flash,redirect,request,abort
from resume.forms import Reg,Login,account,posting,resumebuilder,useredu,userexp,userpro,usersk,achieve,requestresetform,resetpassword
from resume.forms import RegistrationForm,Login,account,posting,resumebuilder,useredu,userexp,userpro,usersk,achieve,requestresetform,resetpassword
from resume.models import UserModel,education,experience,projects,userdetails,skills,achievements
from resume import app,db, bcrypt , mail
from flask_login import login_user,current_user,logout_user,login_required
Expand All @@ -23,7 +23,7 @@ def hello():
def register():
if current_user.is_authenticated:
return redirect(url_for('hello'),code=301)
form = Reg()
form = RegistrationForm()
if form.validate_on_submit():
hashed = bcrypt.generate_password_hash(form.password.data).decode('utf-8')
new_user = UserModel(username=form.username.data,email=form.email.data,password=hashed)
Expand Down