[snowy] Add last-sync-revision support to Note model and API handler.
- From: Sanford Armstrong <sharm src gnome org>
- To: svn-commits-list gnome org
- Subject: [snowy] Add last-sync-revision support to Note model and API handler.
- Date: Mon, 18 May 2009 02:56:57 -0400 (EDT)
commit 7a4057d595d73d0f862eecd9990efd8a045ce089
Author: Sandy Armstrong <sanfordarmstrong gmail com>
Date: Sun May 17 20:47:35 2009 -0700
Add last-sync-revision support to Note model and API handler.
---
api/handlers.py | 1 +
notes/models.py | 2 ++
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/api/handlers.py b/api/handlers.py
index 0346844..372b552 100644
--- a/api/handlers.py
+++ b/api/handlers.py
@@ -143,5 +143,6 @@ def describe_note(note):
'last-metadata-change-date': local_iso(note.modified),
'create-date': local_iso(note.created),
'open-on-startup': note.open_on_startup,
+ 'last-sync-revision': note.last_sync_rev,
'tags': [t.name for t in note.tags.all()],
}
diff --git a/notes/models.py b/notes/models.py
index 2479f9f..0f5f80d 100644
--- a/notes/models.py
+++ b/notes/models.py
@@ -41,6 +41,8 @@ class Note(models.Model):
default=0)
open_on_startup = models.BooleanField(default=False)
+
+ last_sync_rev = models.IntegerField(default=-1)
class Meta:
get_latest_by = 'user_modified'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]