diff --git a/app/routes/auth.py b/app/routes/auth.py index 9d43afc..df5a482 100644 --- a/app/routes/auth.py +++ b/app/routes/auth.py @@ -16,7 +16,7 @@ def signup(): db.session.commit() flash("Account created successfully. Please log in.", "success") return redirect(url_for('auth.login')) - return render_template('signup.html', form=form) + return render_template('reading/signup.html', form=form) @auth.route('/login', methods=['GET', 'POST']) def login(): @@ -28,7 +28,7 @@ def login(): flash("Logged in successfully.", "success") return redirect(url_for('main.dashboard')) flash("Invalid username or password.", "danger") - return render_template('login.html', form=form) + return render_template('reading/login.html', form=form) @auth.route('/logout') @login_required diff --git a/app/routes/reading.py b/app/routes/reading.py index 9c35c18..dc7faaa 100644 --- a/app/routes/reading.py +++ b/app/routes/reading.py @@ -31,7 +31,7 @@ def add_reading(): local_tz = timezone(user_timezone) form.timestamp.data = utc.localize(datetime.utcnow()).astimezone(local_tz) - return render_template('add_reading.html', form=form) + return render_template('reading/add_reading.html', form=form) @reading.route('//edit', methods=['GET', 'POST']) @login_required @@ -67,7 +67,7 @@ def edit_reading(reading_id): flash('Reading updated successfully!', 'success') return redirect(url_for('main.dashboard')) - return render_template('edit_reading.html', form=form, reading=reading) + return render_template('reading/edit_reading.html', form=form, reading=reading) @reading.route('//confirm_delete', methods=['GET', 'POST']) @login_required @@ -82,7 +82,7 @@ def confirm_delete(reading_id): flash('Reading deleted successfully!', 'success') return redirect(url_for('main.dashboard')) - return render_template('confirm_delete.html', reading=reading) + return render_template('reading/confirm_delete.html', reading=reading) @reading.route('//delete', methods=['POST']) diff --git a/app/templates/login.html b/app/templates/auth/login.html similarity index 100% rename from app/templates/login.html rename to app/templates/auth/login.html diff --git a/app/templates/signup.html b/app/templates/auth/signup.html similarity index 100% rename from app/templates/signup.html rename to app/templates/auth/signup.html diff --git a/app/templates/add_reading.html b/app/templates/reading/add_reading.html similarity index 100% rename from app/templates/add_reading.html rename to app/templates/reading/add_reading.html diff --git a/app/templates/confirm_delete.html b/app/templates/reading/confirm_delete.html similarity index 100% rename from app/templates/confirm_delete.html rename to app/templates/reading/confirm_delete.html diff --git a/app/templates/edit_reading.html b/app/templates/reading/edit_reading.html similarity index 100% rename from app/templates/edit_reading.html rename to app/templates/reading/edit_reading.html