diff --git a/main.py b/main.py index 79c57f0..9dc664c 100755 --- a/main.py +++ b/main.py @@ -178,7 +178,9 @@ def admin(): if pass1 is None or \ pass2 is None or \ pass1 != pass2: - return render_template("admin.html", create_error=True, errormsg="Password do not match") + return render_template("admin.html", create_error=True, errormsg="Passwords do not match") + if pass1 == '': + return render_template("admin.html", create_error=True, errormsg="Password cannot be empty") create_user(username,pass1,creator) flash("User created successfully") diff --git a/templates/admin.html b/templates/admin.html index 4c52423..89d364a 100644 --- a/templates/admin.html +++ b/templates/admin.html @@ -12,7 +12,9 @@ {% if messages %} {% endif %} @@ -42,7 +44,7 @@ {% if create_error %}
-

Error: {{ errormsg }}

+
{{ errormsg }}
{% endif %}