Skip to content

Commit

Permalink
Save page on ajax in new content.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzohrab committed Dec 8, 2023
1 parent 7061bdb commit 219ee67
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lute/read/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ def render_page(bookid, pagenum):

pagenum = _page_in_range(book, pagenum)
text = book.texts[pagenum - 1]

book.current_tx_id = text.id
db.session.add(book)
db.session.commit()

paragraphs = get_paragraphs(text)
return render_template("read/sentences.html", paragraphs=paragraphs)

Expand Down

0 comments on commit 219ee67

Please sign in to comment.