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)
|
||||
title = db.Column(db.String(100))
|
||||
description = db.Column(db.Text)
|
||||
is_completed = db.Column(db.Boolean)
|
||||
created_timestamp = db.Column(db.Integer)
|
||||
due_timestamp = db.Column(db.Integer)
|
||||
|
||||
@@ -50,8 +51,7 @@ class Event(db.Model):
|
||||
|
||||
@app.route('/')
|
||||
def index():
|
||||
events = Event.query.all()
|
||||
return render_template('index.html', events=events, datetime=datetime, date=date)
|
||||
return redirect('/events')
|
||||
|
||||
@app.route('/events')
|
||||
def events():
|
||||
|
Reference in New Issue
Block a user