0
https://github.com/evernote/evernote-sdk-python/blob/master/sample/django/evernote_oauth_sample/templates/oauth/callback.html如何顯示每個Evernote的筆記的內容在Django
https://github.com/evernote/evernote-sdk-python/blob/master/sample/django/oauth/views.py
顯示1說明的內容(作品):
// views.py(我的叉子)
updated_filter = NoteFilter(order=NoteSortOrder.UPDATED)
updated_filter.notebookGuid = notebooks[0].guid
offset = 0
max_notes = 1000
result_spec = NotesMetadataResultSpec(includeTitle=True)
result_list = note_store.findNotesMetadata(auth_token, updated_filter, offset, max_notes, result_spec)
note_guid = result_list.notes[0].guid
content = note_store.getNoteContent(auth_token, note_store.getNote(note_guid, True, False, False, False).guid)
return render_to_response('oauth/callback.html', {'notebooks': notebooks, 'result_list': result_list, 'content': content})
//的OAuth/callback.html(我的叉)
<ul>
{% for note in result_list.notes %}
<li><b>{{ note.title }}</b><br>{{ content }}</li>
{% endfor %}
如何顯示每張鈔票在Django的內容?(這是不成功的嘗試之一)
updated_filter = NoteFilter(order=NoteSortOrder.UPDATED)
updated_filter.notebookGuid = notebooks[0].guid
offset = 0
max_notes = 1000
result_spec = NotesMetadataResultSpec(includeTitle=True)
result_list = note_store.findNotesMetadata(auth_token, updated_filter, offset, max_notes, result_spec)
contents = []
for note in result_list.notes:
content = note_store.getNoteContent(auth_token, note_store.getNote(note.guid, True, False, False, False).guid)
contents.append(content)
return render_to_response('oauth/callback.html', {'notebooks': notebooks, 'result_list': result_list, 'contents': contents})
<ul>
{% for note in result_list.notes %}
{% for content in contents %}
<li><b>{{ note.title }}</b><br>{{ content }}</li>
{% endfor %}
</ul>
'{%爲標題,內容爲title_contents.items%}' 固定變量名稱,title_contents代替tield_contents – lvcpp
尚王,感謝您的大力幫助! – lvcpp
我修正了錯字。不用謝。 –