diff --git a/app.py b/app.py index a95f568..777a9e2 100644 --- a/app.py +++ b/app.py @@ -55,7 +55,7 @@ def handle_submission(): form_password = request.form.get('password') or '' if not form_username or not form_email or not form_password: - return render_template('signup.html', error="All fields are required"), 400 + return render_template('signup.html', error="All fields must be entered to complete registration"), 400 if len(form_password) < 8: return render_template('signup.html', error="Password must be at least 8 characters"), 400 @@ -63,7 +63,7 @@ def handle_submission(): if User.query.filter_by(username=form_username).first(): return render_template('signup.html', user_taken="Username has already been taken"), 400 if User.query.filter_by(email=form_email).first(): - return render_template('signup.html', email_taken="Email has already been used"), 400 + return render_template('signup.html', email_taken="Email has already been used before"), 400 hashed_password = generate_password_hash(form_password) new_user = User(username=form_username, email=form_email, password_hash=hashed_password) @@ -73,7 +73,7 @@ def handle_submission(): db.session.commit() except IntegrityError: db.session.rollback() - return render_template('signup.html', error="Username or email already taken"), 400 + return render_template('signup.html', error="Username or email has already taken"), 400 return render_template('signup.html', success_message="Account successfully created") @@ -161,6 +161,10 @@ def logout(): def signup(): return render_template('signup.html') +@app.route('/pagemaker') +def pagemaker(): + return render_template('pagemaker.html') + @app.route('/all_users') @login_required def all_users(): diff --git a/instance/accounts.db b/instance/accounts.db new file mode 100644 index 0000000..9babad2 Binary files /dev/null and b/instance/accounts.db differ diff --git a/templates/about.html b/templates/about.html index 71385fe..90d3dec 100644 --- a/templates/about.html +++ b/templates/about.html @@ -1,4 +1,6 @@ {% extends 'base.html' %} {% block content %}

About this website

+ +

This website is about different subjects in Maths and resources for them.

{% endblock %} \ No newline at end of file diff --git a/templates/pagemaker.html b/templates/pagemaker.html new file mode 100644 index 0000000..66dc594 --- /dev/null +++ b/templates/pagemaker.html @@ -0,0 +1,4 @@ +{% extends 'base.html' %} +{% block content %} +

Where all the things required for making a page

+{% endblock %} \ No newline at end of file