From 8dfe21acd47e30eed8d2adc82ba8ce50ccd375d6 Mon Sep 17 00:00:00 2001 From: zhuyj17 Date: Sun, 25 Sep 2016 17:17:34 +0800 Subject: [PATCH] Add submission time to applymsg. --- src/model.py | 4 +++- web/templates/beansapplication.html | 6 ++++-- web/templates/user_list.html | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/model.py b/src/model.py index 32e773a..d332dfb 100755 --- a/src/model.py +++ b/src/model.py @@ -247,12 +247,14 @@ class ApplyMsg(db.Model): number = db.Column(db.Integer) reason = db.Column(db.String(600)) status = db.Column(db.String(10)) + time = db.Column(db.String(10)) def __init__(self,username, number, reason): self.username = username self.number = number self.reason = reason self.status = "Processing" + self.time = datetime.now().strftime("%Y-%m-%d %H:%M:%S") def __repr__(self): - return "{\"id\":\"%d\", \"username\":\"%s\", \"number\": \"%d\", \"reason\":\"%s\", \"status\":\"%s\"}" % (self.id, self.username, self.number, self.reason, self.status) + return "{\"id\":\"%d\", \"username\":\"%s\", \"number\": \"%d\", \"reason\":\"%s\", \"status\":\"%s\", \"time\":\"%s\"}" % (self.id, self.username, self.number, self.reason, self.status, self.time) diff --git a/web/templates/beansapplication.html b/web/templates/beansapplication.html index 656d731..80c3010 100644 --- a/web/templates/beansapplication.html +++ b/web/templates/beansapplication.html @@ -35,7 +35,7 @@

- +