[Fixed]-How to show the content of each Evernote note in Django

1👍

You should associate your content with each note using some data structure(assume that no note.title are the same):

title_contents = {}
for note in result_list.notes:
    content = note_store.getNoteContent(auth_token, 
                                        note_store.getNote(note.guid, 
                                        True,False, False, False).guid)
    title_contents[note.title] = content

return render_to_response('oauth/callback.html', {'notebooks': notebooks, 
                                                  'result_list': result_list, 
                                                  'title_contents': title_contents})

In your template:

<ul>
  {% for title, content in title_contents.items %}
    <li><b>{{ title }}</b><br>{{ content }}</li>
  {% endfor %}
</ul>

Leave a comment