def add_vote():
if not session.get('logged_in'):
abort(401)
+ daten = date.today() + timedelta(days=60)
+ ndate = daten.strftime('%d %B %Y')
g.db.execute('insert into votes (title, description, date) values (?, ?, ?)',
- [request.form['title'], request.form['description'], date.today() + timedelta(days=60)])
+ [request.form['title'], request.form['description'], ndate])
g.db.commit()
flash('New entry was successfully posted')
return redirect(url_for('show_votes'))
id integer primary key autoincrement,
title string not null,
description string not null,
- date datetime not null
+ date string not null
);