Commits

Jiangge Zhang committed efeda36

unify the naming: LoginForm to SignInForm.

Comments (0)

Files changed (1)

passwood/views/user.py

 
 @bp.route("/signin", methods=["GET", "POST"])
 def signin():
-    form = LoginForm()
+    form = SignInForm()
     if "name" in request.args:
         form.name.data = request.args["name"]
 
         user = User.query.filter_by(name=form.name.data).first()
         if user and user.verify_password(form.password.data):
             login_user(user)
-            flash("Login success.", "success")
+            flash("Sign in success.", "success")
             return redirect(url_for("home.home"))
         else:
             flash("The password is wrong or the user is not exists.",
     mail.send(message)
 
 
-class LoginForm(Form):
+class SignInForm(Form):
     name = TextField("User Name", validators=[
         validators.data_required(),
     ])
     password = PasswordField("Password", validators=[
         validators.data_required(),
     ])
-    submit = SubmitField("Login")
+    submit = SubmitField("Sign In")
 
 
 class SignUpForm(Form):