Merge lp:~manishsinha/zeitgeist-affinity/add-music-skeleton into lp:zeitgeist-affinity

Status: Merged
Merged at revision: 10
Proposed branch: lp:~manishsinha/zeitgeist-affinity/add-music-skeleton
Merge into: lp:zeitgeist-affinity
Diff against target: 111 lines (+58/-1)
7 files modified
logger/models.py (+5/-0)
music/models.py (+14/-0)
music/tests.py (+23/-0)
music/urls.py (+8/-0)
music/views.py (+6/-0)
settings.py (+1/-0)
urls.py (+1/-1)
To merge this branch: bzr merge lp:~manishsinha/zeitgeist-affinity/add-music-skeleton
Reviewer Review Type Date Requested Status
Jamal Fanaian Approve
Review via email: mp+42060@code.launchpad.net

Commit message

Added support for music. Piston based handler needs to be added

Description of the change

Added support for music. Piston based handler needs to be added

To post a comment you must log in.
10. By Manish Sinha (मनीष सिन्हा)

Make Metadata refer back to Event instead of Music refer to Metadata. this way we can have more than one Metadata for each event

Revision history for this message
Jamal Fanaian (jamalta) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'logger/models.py'
--- logger/models.py 2010-10-18 19:22:47 +0000
+++ logger/models.py 2010-11-28 21:05:12 +0000
@@ -16,3 +16,8 @@
16 manifestation = models.CharField(max_length=255)16 manifestation = models.CharField(max_length=255)
17 actor = models.CharField(max_length=255)17 actor = models.CharField(max_length=255)
18 subject = models.ForeignKey(Subject)18 subject = models.ForeignKey(Subject)
19
20class Metadata(models.Model):
21 eventid = models.ForeignKey(Event)
22 name = models.CharField(max_length=255)
23 value = models.CharField(max_length=255)
1924
=== added directory 'music'
=== added file 'music/__init__.py'
=== added file 'music/models.py'
--- music/models.py 1970-01-01 00:00:00 +0000
+++ music/models.py 2010-11-28 21:05:12 +0000
@@ -0,0 +1,14 @@
1from django.db import models
2from affinity.logger import models as EventModel
3
4# Create your models here.
5
6class Music(models.Model):
7 event = models.ForeignKey(EventModel.Event)
8 title = models.CharField(max_length=255)
9 artist = models.CharField(max_length=255)
10 album = models.CharField(max_length=255)
11 year = models.BigIntegerField()
12 comment = models.CharField(max_length=255)
13 track = models.CharField(max_length=255)
14 genre = models.CharField(max_length=255)
015
=== added file 'music/tests.py'
--- music/tests.py 1970-01-01 00:00:00 +0000
+++ music/tests.py 2010-11-28 21:05:12 +0000
@@ -0,0 +1,23 @@
1"""
2This file demonstrates two different styles of tests (one doctest and one
3unittest). These will both pass when you run "manage.py test".
4
5Replace these with more appropriate tests for your application.
6"""
7
8from django.test import TestCase
9
10class SimpleTest(TestCase):
11 def test_basic_addition(self):
12 """
13 Tests that 1 + 1 always equals 2.
14 """
15 self.failUnlessEqual(1 + 1, 2)
16
17__test__ = {"doctest": """
18Another way to test that 1 + 1 is equal to 2.
19
20>>> 1 + 1 == 2
21True
22"""}
23
024
=== added file 'music/urls.py'
--- music/urls.py 1970-01-01 00:00:00 +0000
+++ music/urls.py 2010-11-28 21:05:12 +0000
@@ -0,0 +1,8 @@
1from django.conf.urls.defaults import *
2from piston.resource import Resource
3
4urlpatterns = patterns('affinity.music.views',
5 # Example:
6 (r'^$', 'index'),
7 #(r'^music$', Resource(EventHandler)),
8)
09
=== added file 'music/views.py'
--- music/views.py 1970-01-01 00:00:00 +0000
+++ music/views.py 2010-11-28 21:05:12 +0000
@@ -0,0 +1,6 @@
1# Create your views here.
2
3from django.http import HttpResponse
4
5def index(request):
6 return HttpResponse("Music")
07
=== modified file 'settings.py'
--- settings.py 2010-11-24 19:44:28 +0000
+++ settings.py 2010-11-28 21:05:12 +0000
@@ -90,6 +90,7 @@
90 'django.contrib.sites',90 'django.contrib.sites',
91 'django.contrib.messages',91 'django.contrib.messages',
92 'affinity.logger',92 'affinity.logger',
93 'affinity.music',
93 # Uncomment the next line to enable the admin:94 # Uncomment the next line to enable the admin:
94 'django.contrib.admin',95 'django.contrib.admin',
95 # Uncomment the next line to enable admin documentation:96 # Uncomment the next line to enable admin documentation:
9697
=== modified file 'urls.py'
--- urls.py 2010-10-18 19:22:47 +0000
+++ urls.py 2010-11-28 21:05:12 +0000
@@ -5,8 +5,8 @@
5admin.autodiscover()5admin.autodiscover()
66
7urlpatterns = patterns('',7urlpatterns = patterns('',
8 # Example:
9 (r'^log/', include('logger.urls')),8 (r'^log/', include('logger.urls')),
9 (r'^music/', include('music.urls')),
1010
11 # Uncomment the admin/doc line below to enable admin documentation:11 # Uncomment the admin/doc line below to enable admin documentation:
12 # (r'^admin/doc/', include('django.contrib.admindocs.urls')),12 # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

Subscribers

People subscribed via source and target branches