22 lines
513 B
Python
22 lines
513 B
Python
from flask import render_template
|
|
from app import app
|
|
|
|
@app.route('/')
|
|
@app.route('/index')
|
|
def index():
|
|
user = { 'nickname': 'Miguel' }
|
|
posts = [
|
|
{
|
|
'author': { 'nickname': 'John' },
|
|
'body': 'Beautiful day in Portland!'
|
|
},
|
|
{
|
|
'author': { 'nickname': 'Susan' },
|
|
'body': 'The Avengers movie was so cool!'
|
|
}
|
|
]
|
|
return render_template("index.html",
|
|
title = 'Home',
|
|
user = user,
|
|
posts = posts)
|