diff --git a/app/routes.py b/app/routes.py index 7bbe10a..b805ff7 100644 --- a/app/routes.py +++ b/app/routes.py @@ -1,17 +1,17 @@ from flask import send_from_directory, redirect, url_for, render_template, request -from app.models import Season, Episode +from app.models import Season, Episode, Quote from app import app @app.route("/") def index(): - return render_template("view.html", seasons=Season.query.all()) + return render_template("home.html", seasons=Season.query.all(), nquotes=len(Quote.query.all()), nepisodes=len(Episode.query.all())) @app.route("/view//") def viewSeason(season): return render_template( - "season.html", season=Season.query.filter_by(id=season).first_or_404() + "season.html", season=Season.query.filter_by(id=season).first_or_404(), seasons=Season.query.all() ) @app.route("/view///") @@ -20,7 +20,7 @@ def viewEpisode(season, episode): if not e.built: print("Rebuilding") e.build() - return render_template("episode.html", episode=e) + return render_template("episode.html", episode=e, seasons=Season.query.all()) @app.route("/rebuild///") diff --git a/app/templates/episode.html b/app/templates/episode.html index ae07437..6bf1452 100644 --- a/app/templates/episode.html +++ b/app/templates/episode.html @@ -12,7 +12,6 @@ {% endblock head %} {% block content %} - {{ super() }}section

+ Serving {{ nquotes }} quotes over {{ nepisodes }} episodes. + Designed in Bulma, coded in Python using Flask and SQLAlchemy.
+ Search Engine implemented in Whoosh, and hosted on $HostingProvider.
+ Built by Xevion. +

+{% endblock %} \ No newline at end of file diff --git a/app/templates/season.html b/app/templates/season.html index 3d8fb72..7c948b4 100644 --- a/app/templates/season.html +++ b/app/templates/season.html @@ -12,4 +12,4 @@ Season {{ season.id }}
{% endfor %} -{% endblock content %} \ No newline at end of file +{% endblock content %} \ No newline at end of file diff --git a/app/templates/view.html b/app/templates/view.html deleted file mode 100644 index 87ebaf4..0000000 --- a/app/templates/view.html +++ /dev/null @@ -1,4 +0,0 @@ -{% extends 'content.html' %} -{% block content %} -{{ super() }} -{% endblock content %} \ No newline at end of file