Created
December 29, 2018 00:54
-
-
Save JohnnyFang/4e165dc153ad33ea1f787e6834a0f43b to your computer and use it in GitHub Desktop.
Flask todo app - webapp views.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/webapp/views.py | |
from flask import render_template | |
from app.models import Todo | |
from . import webapp | |
@webapp.route('/') | |
def index(): | |
all_todos = Todo.query.all() | |
return render_template("index.html", todos=all_todos) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment