Merge lp:~manishsinha/zeitgeist-affinity/add-uid-to-event into lp:zeitgeist-affinity

Status: Merged
Approved by: Jamal Fanaian
Approved revision: 13
Merged at revision: 13
Proposed branch: lp:~manishsinha/zeitgeist-affinity/add-uid-to-event
Merge into: lp:zeitgeist-affinity
Diff against target: 60 lines (+7/-3)
4 files modified
README (+4/-2)
logger/handlers.py (+1/-1)
logger/models.py (+1/-0)
music/handlers.py (+1/-0)
To merge this branch: bzr merge lp:~manishsinha/zeitgeist-affinity/add-uid-to-event
Reviewer Review Type Date Requested Status
Jamal Fanaian Approve
Review via email: mp+42263@code.launchpad.net

Description of the change

Fix bug #683192 , it was decided to have this field initially, but skipped out of our mind

To post a comment you must log in.
Revision history for this message
Jamal Fanaian (jamalta) wrote :

Great, thanks! Completely forgot about this, haha.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README'
2--- README 2010-11-30 15:46:12 +0000
3+++ README 2010-11-30 16:15:38 +0000
4@@ -20,7 +20,9 @@
5
6 To create an event:
7
8- curl -H 'Content-Type:application/json' -X POST -d '{"origin": "test origin", "interpretation": "test interpretation", "manifestation": "test manifestation", "actor": "test actor", "subject": {"interpretation": "test interpretation subject", "manifestation": "test manifestation subject", "origin": "test origin subject", "mimetype": "test mimetype", "text": "more testing"}}' http://localhost:8000/log/event
9+uid is suggested to be a SHA1 hash of any randomly generated data (probably using /dev/urandom)
10+
11+ curl -H 'Content-Type:application/json' -X POST -d '{"uid": "blahblah", "origin": "test origin", "interpretation": "test interpretation", "manifestation": "test manifestation", "actor": "test actor", "subject": {"interpretation": "test interpretation subject", "manifestation": "test manifestation subject", "origin": "test origin subject", "mimetype": "test mimetype", "text": "more testing"}}' http://localhost:8000/log/event
12
13
14 To create a music event:
15@@ -33,7 +35,7 @@
16 'track',
17 'genre',
18
19- curl -H 'Content-Type:application/json' -X POST -d '{"title": "test title", "artist": "test artist", "album": "test album", "year": 2010, "comment": "test comment", "track": 1, "genre": "test genre", "event": {"origin": "test origin", "interpretation": "test interpretation", "manifestation": "test manifestation", "actor": "test actor", "subject": {"interpretation": "test interpretation subject", "manifestation": "test manifestation subject", "origin": "test origin subject", "mimetype": "test mimetype", "text": "more testing"}}}' http://localhost:8000/music/
20+ curl -H 'Content-Type:application/json' -X POST -d '{"title": "test title", "artist": "test artist", "album": "test album", "year": 2010, "comment": "test comment", "track": 1, "genre": "test genre", "event": {"uid": "blahblah", "origin": "test origin", "interpretation": "test interpretation", "manifestation": "test manifestation", "actor": "test actor", "subject": {"interpretation": "test interpretation subject", "manifestation": "test manifestation subject", "origin": "test origin subject", "mimetype": "test mimetype", "text": "more testing"}}}' http://localhost:8000/music/
21
22
23 To query an event:
24
25=== modified file 'logger/handlers.py'
26--- logger/handlers.py 2010-11-30 03:31:16 +0000
27+++ logger/handlers.py 2010-11-30 16:15:38 +0000
28@@ -12,7 +12,7 @@
29 API endpoint for Subject.
30 """
31 allowed_methods = ('POST','GET')
32- fields = ('timestamp', 'origin', 'interpretation', 'manifestation', 'actor',
33+ fields = ('uid', 'timestamp', 'origin', 'interpretation', 'manifestation', 'actor',
34 ('subject', ('interpretation', 'manifestation', 'origin', 'mimetype', 'text')))
35
36 def create(self, request):
37
38=== modified file 'logger/models.py'
39--- logger/models.py 2010-11-28 21:02:29 +0000
40+++ logger/models.py 2010-11-30 16:15:38 +0000
41@@ -10,6 +10,7 @@
42 text = models.CharField(max_length=255)
43
44 class Event(models.Model):
45+ uid = models.CharField(max_length=160)
46 timestamp = models.DateTimeField(auto_now=True, auto_now_add=True)
47 origin = models.CharField(max_length=255)
48 interpretation = models.CharField(max_length=255)
49
50=== modified file 'music/handlers.py'
51--- music/handlers.py 2010-11-30 03:31:16 +0000
52+++ music/handlers.py 2010-11-30 16:15:38 +0000
53@@ -23,6 +23,7 @@
54 'genre',
55
56 ('event', (
57+ 'uid',
58 'timestamp',
59 'origin',
60 'interpretation',

Subscribers

People subscribed via source and target branches