http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10948
Revision: 10948 Author: xqt Date: 2013-01-17 08:22:05 +0000 (Thu, 17 Jan 2013) Log Message: ----------- Should be allowed to create a DataPage with different language code not equal to wikidata. May be there could be a Page property method that creates the DataPage like
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2013-01-17 07:18:39 UTC (rev 10947) +++ trunk/pywikipedia/wikipedia.py 2013-01-17 08:22:05 UTC (rev 10948) @@ -4058,8 +4058,11 @@ site = getSite(site) self._originSite = site Page.__init__(self, site, *args, **kwargs) - if self.site()!=getSite("wikidata",fam="wikidata"): - raise Error("Site of Wikidata objects must be set as getSite('wikidata',fam='wikidata')") + + @property + def site(self): + return super(wikidataPage, self).site.data_repository() + def setitem(self, summary=None, watchArticle=False, minorEdit=True, newPage=False, token=None, newToken=False, sysop=False, captcha=None, botflag=True, maxTries=-1, items={}):
pywikipedia-svn@lists.wikimedia.org