diff options
| author | Guillaume Horel <guillaume.horel@gmail.com> | 2015-03-26 22:47:26 -0400 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@gmail.com> | 2015-03-26 22:47:26 -0400 |
| commit | dbd8753c2bdd78d669d9ee9bc353c3f3f4b0b228 (patch) | |
| tree | 14905aeb6ea2c208048ebeec31d0ff5beed54dac | |
| parent | 13af51344c06cad01f01c4324744860d52a76ef5 (diff) | |
| download | wedding-website-dbd8753c2bdd78d669d9ee9bc353c3f3f4b0b228.tar.gz | |
also store the last time form was updated
| -rw-r--r-- | schema.sql | 3 | ||||
| -rw-r--r-- | wedding.py | 3 |
2 files changed, 4 insertions, 2 deletions
@@ -9,5 +9,6 @@ create table guests( plusonename text, kids boolean default 0, kidsnames text, - comments text + comments text, + lastupdate integer(4) default current_timestamp ); @@ -82,7 +82,8 @@ def rsvp(): else: args.append(v) update_string = ",".join(update_string) - query = "UPDATE guests set %s WHERE user_name=?" % update_string + query = "UPDATE guests set {0} , lastupdate=current_timestamp " \ + "WHERE user_name=?".format(update_string) with db: db.execute(query, tuple(args+[session['user_name']])) flash(gettext("We have updated your information!")) |
