notepad

Check-in [df124d1636]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Argh, need to provide the key.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:df124d1636805219aaf2d81d81e171ad5d4685e3de12e796bd80df8fe9204338
User & Date: vandys 2018-10-12 13:01:31
Context
2018-10-12
13:01
Need to ref "value" field of input element. check-in: 10d20b52c3 user: vandys tags: master, trunk
13:01
Argh, need to provide the key. check-in: df124d1636 user: vandys tags: master, trunk
02:48
Get delete and edit-in-place working check-in: 9e91926a05 user: vandys tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to sync.py.

51
52
53
54
55
56
57

58
59
60
61
62
63
64
65
# Gather our current notes, keyed by note's index name (noteXXXX)
onotes = {}
c = conn.cursor()
c.execute(
 "select key,tm,title,content from notes where user=? and tm>?",
 (user, tm))
for tup in c:

    onotes[tup[0]] = {"tm": tup[1], "title": tup[2], "content": tup[3]}

# For each note which they've changed, either accept the change,
#  or send back the newer content which we've already received.
resp = {}
changes = False
c = conn.cursor()
for key,note in req.iteritems():







>
|







51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Gather our current notes, keyed by note's index name (noteXXXX)
onotes = {}
c = conn.cursor()
c.execute(
 "select key,tm,title,content from notes where user=? and tm>?",
 (user, tm))
for tup in c:
    onotes[tup[0]] = {"tm": tup[1], "key": tup[0],
	"title": tup[2], "content": tup[3]}

# For each note which they've changed, either accept the change,
#  or send back the newer content which we've already received.
resp = {}
changes = False
c = conn.cursor()
for key,note in req.iteritems():