allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [7/9] git commit: [#7292] move UserProfileRestController from base rest.py file, to profile module
Date Mon, 21 Apr 2014 17:24:06 GMT
[#7292] move UserProfileRestController from base rest.py file, to profile module


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

Branch: refs/heads/master
Commit: 1b51b773345362c9538490fefea41150832646c1
Parents: 6b9cea0
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Mon Apr 21 17:16:23 2014 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Mon Apr 21 17:22:30 2014 +0000

----------------------------------------------------------------------
 Allura/allura/controllers/rest.py           | 14 --------------
 Allura/allura/ext/user_profile/user_main.py | 16 +++++++++++++++-
 2 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/1b51b773/Allura/allura/controllers/rest.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/rest.py b/Allura/allura/controllers/rest.py
index 7759326..abe6454 100644
--- a/Allura/allura/controllers/rest.py
+++ b/Allura/allura/controllers/rest.py
@@ -313,17 +313,3 @@ class ProjectRestController(object):
             return '<?xml version="1.0" encoding="UTF-8" ?>' + c.project.doap()
         return c.project.__json__()
 
-
-class UserProfileRestController(object):
-    @expose('json:')
-    def index(self, **kw):
-        user = c.project.user_project_of
-        if not user:
-            raise exc.HTTPNotFound()
-        sections = [section(user, c.project)
-                    for section in c.app.profile_sections]
-        json = {}
-        for s in sections:
-            if hasattr(s, '__json__'):
-                json.update(s.__json__())
-        return json

http://git-wip-us.apache.org/repos/asf/allura/blob/1b51b773/Allura/allura/ext/user_profile/user_main.py
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/user_profile/user_main.py b/Allura/allura/ext/user_profile/user_main.py
index dde500c..bbc568b 100644
--- a/Allura/allura/ext/user_profile/user_main.py
+++ b/Allura/allura/ext/user_profile/user_main.py
@@ -41,7 +41,6 @@ from allura.controllers import BaseController
 from allura.controllers.feed import FeedArgs, FeedController
 from allura.lib.decorators import require_post
 from allura.lib.widgets.user_profile import SendMessageForm
-from allura.controllers.rest import UserProfileRestController
 
 log = logging.getLogger(__name__)
 
@@ -212,6 +211,21 @@ class UserProfileController(BaseController, FeedController):
         return redirect(c.project.user_project_of.url())
 
 
+class UserProfileRestController(object):
+    @expose('json:')
+    def index(self, **kw):
+        user = c.project.user_project_of
+        if not user:
+            raise exc.HTTPNotFound()
+        sections = [section(user, c.project)
+                    for section in c.app.profile_sections]
+        json = {}
+        for s in sections:
+            if hasattr(s, '__json__'):
+                json.update(s.__json__())
+        return json
+
+
 class ProfileSectionBase(object):
 
     """


Mime
View raw message