changeset 6100:33d6f7a46bf4

routing: use POST to 'edit_repo_statistics_update' instead of PUT
author Mads Kiilerich <madski@unity3d.com>
date Thu, 04 Aug 2016 14:23:36 +0200
parents bf639e54292e
children e423ed080057
files kallithea/config/routing.py kallithea/templates/admin/repos/repo_edit_statistics.html
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/config/routing.py	Thu Aug 04 14:23:36 2016 +0200
+++ b/kallithea/config/routing.py	Thu Aug 04 14:23:36 2016 +0200
@@ -594,9 +594,9 @@
     rmap.connect("edit_repo_statistics", "/{repo_name:.*?}/settings/statistics",
                  controller='admin/repos', action="edit_statistics",
                  conditions=dict(method=["GET"], function=check_repo))
-    rmap.connect("edit_repo_statistics", "/{repo_name:.*?}/settings/statistics",
+    rmap.connect("edit_repo_statistics_update", "/{repo_name:.*?}/settings/statistics",
                  controller='admin/repos', action="edit_statistics",
-                 conditions=dict(method=["PUT"], function=check_repo))
+                 conditions=dict(method=["POST"], function=check_repo))
 
     #still working url for backward compat.
     rmap.connect('raw_changeset_home_depraced',
--- a/kallithea/templates/admin/repos/repo_edit_statistics.html	Thu Aug 04 14:23:36 2016 +0200
+++ b/kallithea/templates/admin/repos/repo_edit_statistics.html	Thu Aug 04 14:23:36 2016 +0200
@@ -1,4 +1,4 @@
-${h.form(url('edit_repo_statistics', repo_name=c.repo_info.repo_name), method='put')}
+${h.form(url('edit_repo_statistics_update', repo_name=c.repo_info.repo_name))}
 <div class="form">
     <div class="fields">
        <div class="field" style="border:none;color:#888">