This is an tool used to manage contests created and managed by WikiMovimento Brasil. It allows evaluators to validate editions made to articles participating in said contests, and also adds up the points earned by participants. Different contest evaluators can have their own profile, and their own separate validation history of the contributions they have checked.
The system's informations comes from local databases, which contain the data on the articles editions. These databases are fed by cron jobs, which must be set up separetely.
- Python 3.x
- Django 4.x
- pip (Python package installer)
- Clone the repository:
git clone https://github.com/WikiMovimentoBrasil/wikiscore.git
cd wikiscore
- Create and activate a virtual environment:
python3 -m venv env
source env/bin/activate
- Install the required packages:
pip install -r requirements.txt
- Apply the migrations:
python manage.py migrate
- Run the following command to create a superuser:
python manage.py createsuperuser
- Follow the prompts to enter the username, email, and password for the superuser. Make sure the username matches the username on Wikimedia, so you can log-in with OAuth.
-
Register your application on the Wikimedia OAuth to obtain the consumer key and secret. Ensure that your request:
- Uses OAuth version 1.0a
- Sets "http://127.0.0.1:8000/" as the callback URL
- Grants permission solely for user identity verification
-
Create your
.env
file and add the following settings:
SOCIAL_AUTH_MEDIAWIKI_KEY = 'your_consumer_key'
SOCIAL_AUTH_MEDIAWIKI_SECRET = 'your_consumer_secret'
SECRET_KEY = 'your_Django_secret_key'
- Start the development server:
python manage.py runserver
-
Visit 127.0.0.1:8000 on your preferred browser and log in via OAuth using the superuser account.
-
Visit 127.0.0.1:8000/admin/ and navigate to the "Groups" section.
-
Create a new group (affiliate, usergroup, unnoficial group, etc) and add yourself to the group as a "Manager".
- Open your crontab file:
crontab -e
- Add the following line to the crontab file to run the update command every 10 minutes:
*/10 * * * * /path/to/your/virtualenv/bin/python /path/to/your/project/manage.py update
Replace /path/to/your/virtualenv
and /path/to/your/project
with the appropriate paths for your environment.
For detailed instructions on creating contests, please refer to the GitHub Wiki of this repository.