parent:
715c861ce7882cf4b3ba873efee273b07d286bbf
Nick Mykins <nick.mykins@gmail.com>
2013-12-22T21:49:19-05:00
fixed bug that defeats whole purpose of exquisite corpse
diff --git a/exquisite_corpse.py b/exquisite_corpse.py
index cf0ae271c5f7218368ad6104cb4ae20ab3eb185a..f55f203726cc5e8ec62ec629d08707af5d8b2e64 100644
--- a/exquisite_corpse.py
+++ b/exquisite_corpse.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
"""
- Flaskr
+ bulit from Flaskr
~~~~~~
A microblog example application written as Flask tutorial with
@@ -73,7 +73,7 @@
@app.route('/')
def show_entries():
db = get_db()
- cur = db.execute('select text from entries order by id desc')
+ cur = db.execute('select text from entries order by id desc limit 1')
entries = cur.fetchall()
cookie_insertion()
return render_template('show_entries.html', entries=entries)
@@ -98,7 +98,7 @@ [request.form['text']])
db.commit()
flash('thank you!')
with open('poem','a') as poemfile:
- poemfile.write(request.form['text']+'\n')
+ poemfile.write(request.form['text'])
response.set_cookie('my_last_post_id',value=str(get_last_post_id()))
return response