Merge lp:~rodrigo-moya/desktopcouch/notes-record-type into lp:desktopcouch

Proposed by Rodrigo Moya
Status: Merged
Approved by: Tim Cole
Approved revision: 64
Merged at revision: not available
Proposed branch: lp:~rodrigo-moya/desktopcouch/notes-record-type
Merge into: lp:desktopcouch
Diff against target: None lines
To merge this branch: bzr merge lp:~rodrigo-moya/desktopcouch/notes-record-type
Reviewer Review Type Date Requested Status
Tim Cole (community) Approve
Stuart Langridge (community) Approve
Review via email: mp+11793@code.launchpad.net

Commit message

Added basic notes record API to include NOTE_RECORD_TYPE

To post a comment you must log in.
Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

Added basic notes record API to include NOTE_RECORD_TYPE

Revision history for this message
Stuart Langridge (sil) wrote :

Doesn't actually *do* very much, so, fine. :)

review: Approve
Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

Forgot to add that this is for using NOTE_RECORD_TYPE in lib/ubuntuone/cloud_server/views.py, to add notes-related views to the VIEW_REGISTRY, which will come in a separate branch

Revision history for this message
Tim Cole (tcole) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'desktopcouch/notes'
2=== added file 'desktopcouch/notes/__init__.py'
3--- desktopcouch/notes/__init__.py 1970-01-01 00:00:00 +0000
4+++ desktopcouch/notes/__init__.py 2009-09-15 14:45:36 +0000
5@@ -0,0 +1,19 @@
6+# Copyright 2009 Canonical Ltd.
7+#
8+# This file is part of desktopcouch-notes.
9+#
10+# desktopcouch is free software: you can redistribute it and/or modify
11+# it under the terms of the GNU Lesser General Public License version 3
12+# as published by the Free Software Foundation.
13+#
14+# desktopcouch is distributed in the hope that it will be useful,
15+# but WITHOUT ANY WARRANTY; without even the implied warranty of
16+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+# GNU Lesser General Public License for more details.
18+#
19+# You should have received a copy of the GNU Lesser General Public License
20+# along with desktopcouch. If not, see <http://www.gnu.org/licenses/>.
21+#
22+# Authors: Rodrigo Moya <rodrigo.moya@canonical.com>
23+
24+"""UbuntuOne Notes API"""
25
26=== added file 'desktopcouch/notes/record.py'
27--- desktopcouch/notes/record.py 1970-01-01 00:00:00 +0000
28+++ desktopcouch/notes/record.py 2009-09-15 14:45:36 +0000
29@@ -0,0 +1,31 @@
30+# Copyright 2009 Canonical Ltd.
31+#
32+# This file is part of desktopcouch-notes.
33+#
34+# desktopcouch is free software: you can redistribute it and/or modify
35+# it under the terms of the GNU Lesser General Public License version 3
36+# as published by the Free Software Foundation.
37+#
38+# desktopcouch is distributed in the hope that it will be useful,
39+# but WITHOUT ANY WARRANTY; without even the implied warranty of
40+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
41+# GNU Lesser General Public License for more details.
42+#
43+# You should have received a copy of the GNU Lesser General Public License
44+# along with desktopcouch. If not, see <http://www.gnu.org/licenses/>.
45+#
46+# Authors: Rodrigo Moya <rodrigo.moya@canonical.com>
47+
48+
49+"""A dictionary based note record representation."""
50+
51+from desktopcouch.records.record import Record
52+
53+NOTE_RECORD_TYPE = 'http://www.freedesktop.org/wiki/Specifications/desktopcouch/note'
54+
55+class Note(Record):
56+ """An Ubuntuone Note Record."""
57+
58+ def __init__(self, data=None, record_id=None):
59+ super(Note, self).__init__(
60+ record_id=record_id, data=data, record_type=NOTE_RECORD_TYPE)

Subscribers

People subscribed via source and target branches