Created
January 12, 2017 21:01
-
-
Save Frankity/c721fe391fe64f837d8e600f21ff58eb to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python2 | |
# -*- coding: utf-8 -*- | |
from api import db | |
from flask import jsonify | |
from datetime import datetime | |
class TodoList(db.Model): | |
__tablename__ = 'todolist' | |
id = db.Column(db.Integer, primary_key=True) | |
todo = db.Column(db.String(800)) | |
startdate = db.Column(db.String(20)) | |
enddate = db.Column(db.String(20)) | |
ownerid = db.Column(db.Integer) | |
completed = db.Column(db.Integer) | |
def __init__(self, todo = "", startdate = "", enddate = "", ownerid = "", completed = ""): | |
curtime = datetime.now().strftime('%Y-%m-%d %H:%M:%S') | |
self.todo = todo | |
self.startdate = curtime | |
self.enddate = enddate | |
self.ownerid = ownerid | |
self.completed = 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment