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

Status: Merged
Approved by: Jamal Fanaian on 2010-11-30
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 2010-11-30 Approve on 2010-11-30
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.
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
=== modified file 'README'
--- README 2010-11-30 15:46:12 +0000
+++ README 2010-11-30 16:15:38 +0000
@@ -20,7 +20,9 @@
2020
21To create an event:21To create an event:
2222
23 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/event23uid is suggested to be a SHA1 hash of any randomly generated data (probably using /dev/urandom)
24
25 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
24 26
2527
26To create a music event:28To create a music event:
@@ -33,7 +35,7 @@
33 'track', 35 'track',
34 'genre', 36 'genre',
35 37
36 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/38 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/
3739
3840
39To query an event:41To query an event:
4042
=== modified file 'logger/handlers.py'
--- logger/handlers.py 2010-11-30 03:31:16 +0000
+++ logger/handlers.py 2010-11-30 16:15:38 +0000
@@ -12,7 +12,7 @@
12 API endpoint for Subject.12 API endpoint for Subject.
13 """13 """
14 allowed_methods = ('POST','GET')14 allowed_methods = ('POST','GET')
15 fields = ('timestamp', 'origin', 'interpretation', 'manifestation', 'actor',15 fields = ('uid', 'timestamp', 'origin', 'interpretation', 'manifestation', 'actor',
16 ('subject', ('interpretation', 'manifestation', 'origin', 'mimetype', 'text')))16 ('subject', ('interpretation', 'manifestation', 'origin', 'mimetype', 'text')))
1717
18 def create(self, request):18 def create(self, request):
1919
=== modified file 'logger/models.py'
--- logger/models.py 2010-11-28 21:02:29 +0000
+++ logger/models.py 2010-11-30 16:15:38 +0000
@@ -10,6 +10,7 @@
10 text = models.CharField(max_length=255)10 text = models.CharField(max_length=255)
1111
12class Event(models.Model):12class Event(models.Model):
13 uid = models.CharField(max_length=160)
13 timestamp = models.DateTimeField(auto_now=True, auto_now_add=True)14 timestamp = models.DateTimeField(auto_now=True, auto_now_add=True)
14 origin = models.CharField(max_length=255)15 origin = models.CharField(max_length=255)
15 interpretation = models.CharField(max_length=255)16 interpretation = models.CharField(max_length=255)
1617
=== modified file 'music/handlers.py'
--- music/handlers.py 2010-11-30 03:31:16 +0000
+++ music/handlers.py 2010-11-30 16:15:38 +0000
@@ -23,6 +23,7 @@
23 'genre', 23 'genre',
2424
25 ('event', (25 ('event', (
26 'uid',
26 'timestamp', 27 'timestamp',
27 'origin', 28 'origin',
28 'interpretation', 29 'interpretation',

Subscribers

People subscribed via source and target branches