Skip to content

Commit

Permalink
Merge pull request DiptoChakrabarty#45 from princekushwaha/development
Browse files Browse the repository at this point in the history
Renamed the form Reg to RegistrationForm
  • Loading branch information
DiptoChakrabarty authored Sep 30, 2021
2 parents 97e3b2d + ab1a56c commit 15d1ee7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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

0 comments on commit 15d1ee7

Please sign in to comment.