allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kentontay...@apache.org
Subject [3/3] allura git commit: Add **kw to various @expose'd methods to avoid errors from extra url params
Date Tue, 09 Jan 2018 13:55:06 GMT
Add **kw to various @expose'd methods to avoid errors from extra url params


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

Branch: refs/heads/master
Commit: 371b9c3ca8097ce8bbc789f445e492a765f33d9b
Parents: c45a510
Author: Dave Brondsema <dave@brondsema.net>
Authored: Mon Jan 8 14:39:11 2018 -0500
Committer: Dave Brondsema <dave@brondsema.net>
Committed: Mon Jan 8 14:39:11 2018 -0500

----------------------------------------------------------------------
 Allura/allura/app.py                                | 2 +-
 Allura/allura/controllers/attachments.py            | 2 +-
 Allura/allura/controllers/project.py                | 2 +-
 Allura/allura/controllers/repository.py             | 2 +-
 Allura/allura/controllers/site_admin.py             | 8 ++++----
 Allura/allura/ext/admin/admin_main.py               | 2 +-
 ForgeDiscussion/forgediscussion/controllers/root.py | 4 ++--
 ForgeTracker/forgetracker/tracker_main.py           | 6 +++---
 ForgeWiki/forgewiki/wiki_main.py                    | 6 +++---
 9 files changed, 17 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/371b9c3c/Allura/allura/app.py
----------------------------------------------------------------------
diff --git a/Allura/allura/app.py b/Allura/allura/app.py
index 937702e..8db59dd 100644
--- a/Allura/allura/app.py
+++ b/Allura/allura/app.py
@@ -1023,7 +1023,7 @@ class WebhooksLookup(BaseController, AdminControllerMixin):
 
     @without_trailing_slash
     @expose('jinja:allura:templates/app_admin_webhooks_list.html')
-    def index(self):
+    def index(self, **kw):
         webhooks = self.app._webhooks
         if len(webhooks) == 0:
             raise exc.HTTPNotFound()

http://git-wip-us.apache.org/repos/asf/allura/blob/371b9c3c/Allura/allura/controllers/attachments.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/attachments.py b/Allura/allura/controllers/attachments.py
index 1e089c3..34ef984 100644
--- a/Allura/allura/controllers/attachments.py
+++ b/Allura/allura/controllers/attachments.py
@@ -124,7 +124,7 @@ class AttachmentController(BaseController):
         return self.attachment.serve(embed=embed)
 
     @expose()
-    def thumb(self):
+    def thumb(self, **kwargs):
         if self.artifact.deleted:
             raise exc.HTTPNotFound
         return self.thumbnail.serve(embed=True)

http://git-wip-us.apache.org/repos/asf/allura/blob/371b9c3c/Allura/allura/controllers/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/project.py b/Allura/allura/controllers/project.py
index 1717828..0a6cbfa 100644
--- a/Allura/allura/controllers/project.py
+++ b/Allura/allura/controllers/project.py
@@ -505,7 +505,7 @@ class ScreenshotController(object):
         return self._screenshot.serve(embed)
 
     @expose()
-    def thumb(self, embed=True):
+    def thumb(self, embed=True, **kwargs):
         return self._thumb.serve(embed)
 
     @LazyProperty

http://git-wip-us.apache.org/repos/asf/allura/blob/371b9c3c/Allura/allura/controllers/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/repository.py b/Allura/allura/controllers/repository.py
index b5394b4..f7a5066 100644
--- a/Allura/allura/controllers/repository.py
+++ b/Allura/allura/controllers/repository.py
@@ -79,7 +79,7 @@ class RepoRootController(BaseController, FeedController):
         require_access(c.app, 'read')
 
     @expose('jinja:allura:templates/markdown_syntax_dialog.html')
-    def markdown_syntax_dialog(self):
+    def markdown_syntax_dialog(self, **kw):
         """Static page explaining markdown."""
         return dict()
 

http://git-wip-us.apache.org/repos/asf/allura/blob/371b9c3c/Allura/allura/controllers/site_admin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/site_admin.py b/Allura/allura/controllers/site_admin.py
index a7ece1a..830bcb4 100644
--- a/Allura/allura/controllers/site_admin.py
+++ b/Allura/allura/controllers/site_admin.py
@@ -103,7 +103,7 @@ class SiteAdminController(object):
 
     @expose('jinja:allura:templates/site_admin_index.html')
     @with_trailing_slash
-    def index(self):
+    def index(self, **kw):
         return {}
 
     def subscribe_artifact(self, url, user):
@@ -430,7 +430,7 @@ class SiteNotificationController(object):
 
     @expose('jinja:allura:templates/site_admin_site_notifications_list.html')
     @with_trailing_slash
-    def index(self, page=0, limit=25):
+    def index(self, page=0, limit=25, **kw):
         c.page_list = W.page_list
         c.page_size = W.page_size
 
@@ -521,7 +521,7 @@ class TaskManagerController(object):
 
     @expose('jinja:allura:templates/site_admin_task_list.html')
     @without_trailing_slash
-    def index(self, page_num=1, minutes=10, state=None, task_name=None, host=None):
+    def index(self, page_num=1, minutes=10, state=None, task_name=None, host=None, **kw):
         now = datetime.utcnow()
         try:
             page_num = int(page_num)
@@ -628,7 +628,7 @@ class StatsController(object):
     """Show neighborhood stats."""
     @expose('jinja:allura:templates/site_admin_stats.html')
     @with_trailing_slash
-    def index(self):
+    def index(self, **kw):
         neighborhoods = []
         for n in M.Neighborhood.query.find():
             project_count = M.Project.query.find(

http://git-wip-us.apache.org/repos/asf/allura/blob/371b9c3c/Allura/allura/ext/admin/admin_main.py
----------------------------------------------------------------------
diff --git a/Allura/allura/ext/admin/admin_main.py b/Allura/allura/ext/admin/admin_main.py
index e683ae6..247a55b 100644
--- a/Allura/allura/ext/admin/admin_main.py
+++ b/Allura/allura/ext/admin/admin_main.py
@@ -1280,7 +1280,7 @@ class GroupController(BaseController):
 
     @with_trailing_slash
     @expose('jinja:allura.ext.admin:templates/project_group.html')
-    def index(self):
+    def index(self, **kw):
         if self._group.name in ('Admin', 'Developer', 'Member'):
             show_settings = False
             action = None

http://git-wip-us.apache.org/repos/asf/allura/blob/371b9c3c/ForgeDiscussion/forgediscussion/controllers/root.py
----------------------------------------------------------------------
diff --git a/ForgeDiscussion/forgediscussion/controllers/root.py b/ForgeDiscussion/forgediscussion/controllers/root.py
index 24c2ea1..4b35254 100644
--- a/ForgeDiscussion/forgediscussion/controllers/root.py
+++ b/ForgeDiscussion/forgediscussion/controllers/root.py
@@ -161,13 +161,13 @@ class RootController(BaseController, DispatchIndex, FeedController):
         return d
 
     @expose('jinja:allura:templates/markdown_syntax.html')
-    def markdown_syntax(self):
+    def markdown_syntax(self, **kw):
         'Static page explaining markdown.'
         return dict()
 
     @with_trailing_slash
     @expose('jinja:allura:templates/markdown_syntax_dialog.html')
-    def markdown_syntax_dialog(self):
+    def markdown_syntax_dialog(self, **kw):
         'Static dialog page about how to use markdown.'
         return dict()
 

http://git-wip-us.apache.org/repos/asf/allura/blob/371b9c3c/ForgeTracker/forgetracker/tracker_main.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tracker_main.py b/ForgeTracker/forgetracker/tracker_main.py
index a245034..a924cc9 100644
--- a/ForgeTracker/forgetracker/tracker_main.py
+++ b/ForgeTracker/forgetracker/tracker_main.py
@@ -897,7 +897,7 @@ class RootController(BaseController, FeedController):
 
     @with_trailing_slash
     @expose('jinja:forgetracker:templates/tracker/search_help.html')
-    def search_help(self):
+    def search_help(self, **kw):
         'Static page with search help'
         return dict()
 
@@ -913,12 +913,12 @@ class RootController(BaseController, FeedController):
                     description=description, summary=summary, labels=labels)
 
     @expose('jinja:allura:templates/markdown_syntax.html')
-    def markdown_syntax(self):
+    def markdown_syntax(self, **kw):
         """Static page explaining markdown."""
         return dict()
 
     @expose('jinja:allura:templates/markdown_syntax_dialog.html')
-    def markdown_syntax_dialog(self):
+    def markdown_syntax_dialog(self, **kw):
         """Static page explaining markdown."""
         return dict()
 

http://git-wip-us.apache.org/repos/asf/allura/blob/371b9c3c/ForgeWiki/forgewiki/wiki_main.py
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/wiki_main.py b/ForgeWiki/forgewiki/wiki_main.py
index 3fb7fb3..db1f266 100644
--- a/ForgeWiki/forgewiki/wiki_main.py
+++ b/ForgeWiki/forgewiki/wiki_main.py
@@ -489,18 +489,18 @@ class RootController(BaseController, DispatchIndex, FeedController):
 
     @with_trailing_slash
     @expose('jinja:forgewiki:templates/wiki/create_page.html')
-    def create_wiki_page(self):
+    def create_wiki_page(self, **kw):
         return {}
 
     @with_trailing_slash
     @expose('jinja:allura:templates/markdown_syntax.html')
-    def markdown_syntax(self):
+    def markdown_syntax(self, **kw):
         'Display a page about how to use markdown.'
         return dict(example=MARKDOWN_EXAMPLE)
 
     @with_trailing_slash
     @expose('jinja:allura:templates/markdown_syntax_dialog.html')
-    def markdown_syntax_dialog(self):
+    def markdown_syntax_dialog(self, **kw):
         'Display a page about how to use markdown.'
         return dict(example=MARKDOWN_EXAMPLE)
 


Mime
View raw message