-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deployment on other Wikimedia wikis (#37)
* Prepare for deployment on other Wikimedia wikis * Better documentation after deployment for Commons * Improve property extraction from diffs * Remove references to Wikidata in code
- Loading branch information
Showing
24 changed files
with
170 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from django.conf import settings | ||
|
||
def mediawiki_site_settings(request): | ||
return { | ||
'MEDIAWIKI_API_ENDPOINT': settings.MEDIAWIKI_API_ENDPOINT, | ||
'MEDIAWIKI_BASE_URL': settings.MEDIAWIKI_BASE_URL, | ||
'MEDIAWIKI_INDEX_ENDPOINT': settings.MEDIAWIKI_INDEX_ENDPOINT, | ||
'PROPERTY_BASE_URL': settings.PROPERTY_BASE_URL, | ||
'USER_BASE_URL': settings.USER_BASE_URL, | ||
'USER_TALK_BASE_URL': settings.USER_TALK_BASE_URL, | ||
'CONTRIBUTIONS_BASE_URL': settings.CONTRIBUTIONS_BASE_URL, | ||
'WIKI_CODENAME': settings.WIKI_CODENAME, | ||
'USER_DOCS_HOMEPAGE': settings.USER_DOCS_HOMEPAGE, | ||
'MEDIAWIKI_NAME': settings.MEDIAWIKI_NAME, | ||
'DISCUSS_PAGE_PREFIX': settings.DISCUSS_PAGE_PREFIX, | ||
'DISCUSS_PAGE_PRELOAD': settings.DISCUSS_PAGE_PRELOAD, | ||
'REVERT_PAGE': settings.REVERT_PAGE, | ||
'REVERT_PRELOAD': settings.REVERT_PRELOAD, | ||
'WIKILINK_BATCH_PREFIX': settings.WIKILINK_BATCH_PREFIX | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import os | ||
from .common import BASE_DIR | ||
|
||
# SECURITY WARNING: keep the secret key used in production secret! | ||
SECRET_KEY = 'insert_a_random_hash_here' | ||
|
||
# Database | ||
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases | ||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.mysql', | ||
'NAME': 's1234__editgroups', # adapt to the database you created | ||
'HOST': 'tools.db.svc.eqiad.wmflabs', | ||
'OPTIONS': { | ||
'init_command': "SET sql_mode='STRICT_TRANS_TABLES'", | ||
'charset': 'utf8mb4', | ||
'read_default_file': os.path.expanduser("~/replica.my.cnf") | ||
}, | ||
} | ||
} | ||
|
||
# Adapt those to the credentials you got | ||
SOCIAL_AUTH_MEDIAWIKI_KEY = '' | ||
SOCIAL_AUTH_MEDIAWIKI_SECRET = '' | ||
SOCIAL_AUTH_MEDIAWIKI_URL = 'https://www.wikidata.org/w/index.php' | ||
SOCIAL_AUTH_MEDIAWIKI_CALLBACK = 'https://editgroups.toolforge.org/oauth/complete/mediawiki/' | ||
|
||
# Redis (if you use it) | ||
REDIS_HOST = 'tools-redis' | ||
REDIS_PORT = 6379 | ||
REDIS_DB = 3 | ||
REDIS_PASSWORD = '' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.