diff --git a/kallithea/config/routing.py b/kallithea/config/routing.py --- a/kallithea/config/routing.py +++ b/kallithea/config/routing.py @@ -357,8 +357,8 @@ def make_map(config): action="my_account_emails", conditions=dict(method=["GET"])) m.connect("my_account_emails", "/my_account/emails", action="my_account_emails_add", conditions=dict(method=["POST"])) - m.connect("my_account_emails", "/my_account/emails", - action="my_account_emails_delete", conditions=dict(method=["DELETE"])) + m.connect("my_account_emails_delete", "/my_account/emails/delete", + action="my_account_emails_delete", conditions=dict(method=["POST"])) m.connect("my_account_api_keys", "/my_account/api_keys", action="my_account_api_keys", conditions=dict(method=["GET"])) diff --git a/kallithea/templates/admin/my_account/my_account_emails.html b/kallithea/templates/admin/my_account/my_account_emails.html --- a/kallithea/templates/admin/my_account/my_account_emails.html +++ b/kallithea/templates/admin/my_account/my_account_emails.html @@ -17,7 +17,7 @@ %endif
${em.email}
- ${h.form(url('my_account_emails'),method='delete')} + ${h.form(url('my_account_emails_delete'))} ${h.hidden('del_email_id',em.email_id)} ${h.submit('remove_',_('Delete'),id="remove_email_%s" % em.email_id, diff --git a/kallithea/tests/functional/test_my_account.py b/kallithea/tests/functional/test_my_account.py --- a/kallithea/tests/functional/test_my_account.py +++ b/kallithea/tests/functional/test_my_account.py @@ -79,8 +79,8 @@ class TestMyAccountController(TestContro response.mustcontain('barz@example.com') response.mustcontain('' % email_id) - response = self.app.post(url('my_account_emails'), - {'del_email_id': email_id, '_method': 'delete', '_authentication_token': self.authentication_token()}) + response = self.app.post(url('my_account_emails_delete'), + {'del_email_id': email_id, '_authentication_token': self.authentication_token()}) self.checkSessionFlash(response, 'Removed email from user') response = self.app.get(url('my_account_emails')) response.mustcontain('No additional emails specified')