From 0f8f199be2873edcec5b48bd3c870955598c63cc Mon Sep 17 00:00:00 2001 From: Bryan Tong Minh <bryan.tongminh@gmail.com> Date: Fri, 7 Nov 2008 22:41:43 +0000 Subject: [PATCH] Added no-redirect option --- mwclient/page.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mwclient/page.py b/mwclient/page.py index 3ea5a6d..6cf82e2 100644 --- a/mwclient/page.py +++ b/mwclient/page.py @@ -150,7 +150,7 @@ class Page(object): except StopIteration: return u'' - def move(self, new_title, reason = '', move_talk = True): + def move(self, new_title, reason = '', move_talk = True, no_redirect = False): if not self.can('move'): raise errors.InsufficientPermission(self) if not self.site.writeapi: @@ -159,6 +159,7 @@ class Page(object): data = {} if move_talk: data['movetalk'] = '1' + if no_redirect: data['noredirect'] = '1' result = self.site.api('move', ('from', self.name), to = new_title, token = self.get_token('move'), reason = reason, **data) return result['move'] -- GitLab