add new "is_completed" column
This commit is contained in:
4
app.py
4
app.py
@@ -30,6 +30,7 @@ class Task(db.Model):
|
|||||||
id = db.Column(db.Integer, primary_key=True)
|
id = db.Column(db.Integer, primary_key=True)
|
||||||
title = db.Column(db.String(100))
|
title = db.Column(db.String(100))
|
||||||
description = db.Column(db.Text)
|
description = db.Column(db.Text)
|
||||||
|
is_completed = db.Column(db.Boolean)
|
||||||
created_timestamp = db.Column(db.Integer)
|
created_timestamp = db.Column(db.Integer)
|
||||||
due_timestamp = db.Column(db.Integer)
|
due_timestamp = db.Column(db.Integer)
|
||||||
|
|
||||||
@@ -50,8 +51,7 @@ class Event(db.Model):
|
|||||||
|
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
def index():
|
def index():
|
||||||
events = Event.query.all()
|
return redirect('/events')
|
||||||
return render_template('index.html', events=events, datetime=datetime, date=date)
|
|
||||||
|
|
||||||
@app.route('/events')
|
@app.route('/events')
|
||||||
def events():
|
def events():
|
||||||
|
Reference in New Issue
Block a user