incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [3/9] git commit: [#7208] ticket:549 Add awards to DOAP API
Date Wed, 12 Mar 2014 20:48:01 GMT
[#7208] ticket:549 Add awards to DOAP API


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/ba275b9c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/ba275b9c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/ba275b9c

Branch: refs/heads/master
Commit: ba275b9c14fd75ce7b473fb5994c30c6592d04a7
Parents: 284c533
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Wed Feb 26 12:17:07 2014 +0200
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Wed Mar 12 20:47:54 2014 +0000

----------------------------------------------------------------------
 Allura/allura/model/project.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ba275b9c/Allura/allura/model/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py
index 21b8b9c..3c9c385 100644
--- a/Allura/allura/model/project.py
+++ b/Allura/allura/model/project.py
@@ -27,7 +27,7 @@ from pylons import tmpl_context as c, app_globals as g
 from pylons import request
 from paste.deploy.converters import asbool
 import formencode as fe
-from datatree import Tree, Node
+from datatree import Node
 
 from ming import schema as S
 from ming.utils import LazyProperty
@@ -1035,6 +1035,11 @@ class Project(MappedClass, ActivityNode, ActivityObject):
         for cat in TroveCategory.query.find({'_id': {'$in': all_troves}}):
             p << Node('category', **{'rdf:resource': 'http://sourceforge.net/api/trove/index/rdf#%s'
% cat.trove_cat_id})
 
+        for a in self.accolades:
+            award = Node('beer:Award')
+            award << Node('beer:awardCategory', a.award.full)
+            award << Node('beer:awardedAt', a.granted_by_neighborhood.name)
+            p << (Node('sf:awarded') << award)
         return root.render(as_root=True)
 
 


Mime
View raw message