From b332df87d7d470a38f453a4c46c5e75a26e49eca Mon Sep 17 00:00:00 2001 From: Jordan Date: Mon, 27 Jul 2026 13:03:04 +1200 Subject: [PATCH] default .db its just a admin account with password password123 --- app.py | 10 +++++++--- instance/accounts.db | Bin 0 -> 16384 bytes templates/about.html | 2 ++ templates/pagemaker.html | 4 ++++ 4 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 instance/accounts.db create mode 100644 templates/pagemaker.html 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 0000000000000000000000000000000000000000..9babad22dec8e53922cb9b39560f1f4a9f7b02c2 GIT binary patch literal 16384 zcmeI&O>fgM7zc2toyJ;e3qq=T^%bSltEh5Pthwv+gI634%rqrB*}l6g$kWI7UaYLVMS)5syEgpgd? zHqy2%T6%K*dKp`H%#njH)ouL;$?sf{oeTY&{&ig{#vuR!2tWV=5P$##AOHafKmY=N z6F3*zt#YZPeZD&v;V?d%#nY_ijsoB7`n2mkZ22@Bp_O7GiDR!9q>G`y>e1(<4#kAF8buYhJzF*QvGLGW+v$w-^%ib4f^U316pWWJL zS--KD`)8t=CFWDntxR=0ZJO?pw4y)&0uX=z1Rwwb2tWV=5P$##Ah1s0{DHPf%KM)> zA{r&*MR&O959DMtlhY5U^M=J-hc|e`+`(y;~VuVwvQ*luB!2xWxB2*>miG| zP*!N$78f;B)f5YvP|USLlSwyJwxNs~i)_i1Yg#Opu5{eGWRbx`JL0^qBA44rG0Uhk zY0Hq+97kHFQBUVkOva88E7KAVXKp08V<}4&({*Y3cal~V2tWV=5P$##AOHafKmY;| zfB*z;mcUlNTv&XixZ3|;68-XKEfA}L00bZa0SG_<0uX=z1Rwwb2>iDKck=sJyZ+yQ GDEtHwyQu^K literal 0 HcmV?d00001 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