http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11674
Revision: 11674 Author: xqt Date: 2013-06-19 15:35:02 +0000 (Wed, 19 Jun 2013) Log Message: ----------- Add test.wikidata.org, update from rewrite r11662
Modified Paths: -------------- trunk/pywikipedia/families/wikidata_family.py
Modified: trunk/pywikipedia/families/wikidata_family.py =================================================================== --- trunk/pywikipedia/families/wikidata_family.py 2013-06-19 15:31:23 UTC (rev 11673) +++ trunk/pywikipedia/families/wikidata_family.py 2013-06-19 15:35:02 UTC (rev 11674) @@ -6,6 +6,7 @@
# The wikidata family
+ class Family(family.WikimediaFamily): def __init__(self): super(Family, self).__init__() @@ -14,6 +15,7 @@ 'wikidata': 'www.wikidata.org', 'repo': 'wikidata-test-repo.wikimedia.de', 'client': 'wikidata-test-client.wikimedia.de', + 'test': 'test.wikidata.org', }
# Override defaults @@ -65,7 +67,7 @@ self.namespaces[1199] = { 'repo': u'Translations talk', 'wikidata': u'Translations talk', - } + }
def shared_data_repository(self, code, transcluded=False): """Always return a repository tupe. This enables testing whether @@ -73,7 +75,11 @@
""" if transcluded: - return(None, None) + return (None, None) else: - return ('wikidata', - 'wikidata') if code == 'wikidata' else ('repo', 'wikidata') + if code == 'wikidata': + return ('wikidata', 'wikidata') + elif code == 'test': + return ('test', 'wikidata') + else: + return ('repo', 'wikidata')
pywikipedia-svn@lists.wikimedia.org