bodhi/controllers.py | 2 +-
bodhi/model.py | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 46ec783c6fccc3d7785398e182fa3152e5409a8e
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Thu Dec 1 22:13:52 2011 +0100
Allow a json view of the user information
diff --git a/bodhi/controllers.py b/bodhi/controllers.py
index 548d9ff..e475297 100644
--- a/bodhi/controllers.py
+++ b/bodhi/controllers.py
@@ -1492,7 +1492,7 @@ class Root(controllers.RootController):
orderBy=PackageUpdate.q.date_submitted)
return dict(updates=updates)
- @expose(template="bodhi.templates.user")
+ @expose(template="bodhi.templates.user", allow_json=True)
@paginate('updates', limit=25, max_limit=25)
def user(self, username):
""" Return a list of updates submitted by a given person
"""
commit 795543b29c0fa8dbe17660ee9a1bcf91acbabb19
Merge: 2244ea9 854efbf
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Dec 1 20:59:44 2011 -0500
Merge branch 'master' of
git+ssh://git.fedorahosted.org/git/bodhi
commit 2244ea94a38bbb4221c8dd6b5a0c912e6034f84d
Author: Luke Macken <lmacken(a)redhat.com>
Date: Tue Nov 22 23:40:40 2011 -0500
Pull in kitchen's defaultdict if necessary
diff --git a/bodhi/model.py b/bodhi/model.py
index e213b7d..aee8b52 100644
--- a/bodhi/model.py
+++ b/bodhi/model.py
@@ -24,7 +24,10 @@ from kid import XML
from kid.element import encode_entity
from sqlobject import *
from datetime import datetime
-from collections import defaultdict
+try:
+ from collections import defaultdict
+except ImportError:
+ from kitchen.pycompat25.collections import defaultdict
from turbogears import config
from turbogears.database import PackageHub