summaryrefslogtreecommitdiff
path: root/app/routes.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/routes.py')
-rw-r--r--app/routes.py24
1 files changed, 5 insertions, 19 deletions
diff --git a/app/routes.py b/app/routes.py
index 7152edd..4604827 100644
--- a/app/routes.py
+++ b/app/routes.py
@@ -1,33 +1,18 @@
from flask import Flask, render_template, flash, redirect, url_for
from forms import RegistrationForm, LoginForm
+from placeholder_posts import posts
from placeholder_news import news
from placeholder_messages import messages
app = Flask(__name__)
app.config['SECRET_KEY'] = 'foobarblendoitfoobar!'
-posts = [{
- 'author':
- 'Marius',
- 'date':
- 'Dec. 26th, 2019',
- 'content':
- "this is a test where I write a message that isn't too short, it isn't too long, it's just the right size."
-}, {
- 'author': 'Achille',
- 'date': 'Dec. 25th, 2019',
- 'content': "this is a second test!"
-}, {
- 'author': 'Jeanne',
- 'date': 'Dec. 24th, 2019',
- 'content': "this is a third test!"
-}]
-
@app.route("/")
@app.route("/home")
def home():
- return render_template('home.html', posts=posts)
+ home_posts = posts + news + messages
+ return render_template('home.html', posts=home_posts)
@app.route("/yes")
@@ -37,7 +22,8 @@ def yes():
@app.route("/no")
def no():
- return render_template("no.html")
+ archives = posts + news + messages
+ return render_template("no.html", archive=archives)
@app.route("/register", methods=['GET', 'POST'])
Copyright 2019--2024 Marius PETER