mg tut c2
This commit is contained in:
@@ -1,7 +1,22 @@
|
||||
from flask import render_template
|
||||
from app import app
|
||||
|
||||
@app.route('/')
|
||||
@app.route('/index')
|
||||
def index():
|
||||
return "Hello, World!"
|
||||
|
||||
user = {'username': 'Finnaa'}
|
||||
posts = [
|
||||
{
|
||||
'author': {'username': 'john'},
|
||||
'body': 'Beautiful day 1'
|
||||
},
|
||||
{
|
||||
'author': {'username': 'susie'},
|
||||
'body': 'Movie is good.'
|
||||
}
|
||||
]
|
||||
#return posts;
|
||||
return render_template('index.html', title='Home', user=user, posts=posts)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user