Restructure tempates directory

This commit is contained in:
Peter Stockings
2024-12-29 22:54:43 +11:00
parent 049e845d5b
commit 91b3ef0e7e
7 changed files with 5 additions and 5 deletions

View File

@@ -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

View File

@@ -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('/<int:reading_id>/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('/<int:reading_id>/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('/<int:reading_id>/delete', methods=['POST'])