Permalink
Browse files

Fixing API use

  • Loading branch information...
1 parent 03c2a8f commit 1c3f60c2ff1fd5897db76a50ad69a3f77456fd9f @fsouza fsouza committed Apr 12, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 examples/books_collection/collection/views.py
@@ -33,13 +33,13 @@ def delete_book(id):
@app.route('/books/edit/<id>')
def edit_book(id):
- book = Book.get(id)
+ book = Book.query.get(id)
form = BookForm(document=book)
return render_template('/books/edit.html', form=form, book=book)
@app.route('/books/edit/<id>', methods=['POST'])
def update_book(id):
- book = Book.get(id)
+ book = Book.query.get(id)
form = BookForm()
if form.validate_on_submit():
form.instance = book

0 comments on commit 1c3f60c

Please sign in to comment.