@get('/edit/<id:int>')
def edit(id):
    cursor = db.cursor()
    cursor.execute('SELECT titulek, obsah FROM poznamky '
                   'WHERE id = {}'.format(id)
                   )
    titulek, obsah = cursor.fetchone()
    cursor.close()
    return template('edit', id=id, titulek=titulek, obsah=obsah)
