An online judge that supports the following languages:
- C
- C++
- Python 2
- Python 3
- Python - Django
- Javascript
- Bootstrap
- sendgrid: Used to send transactional emails like email-id verification.
-
Clone the repository
git clone https://github.com/morphosis-nitmz/Code-Warrior
-
Rename the file .env-sample to .env and replace the value of
SECRET_KEY
with the secret key of your own project. To generate a new secret key- Go to terminal and create a new django project
django-admin startproject <proj-name>
. - Now get the value of
SECRET_KEY
in settings.py and use that as the secret key for the Stock-Bridge project. - Now delete that new django project.
- Go to terminal and create a new django project
-
Sendgrid setup:
- Create an account on sendgrid.
- Add your sendgrid username and password to
EMAIL_HOST_USER
andEMAIL_HOST_PASSWORD
in credentials.py respectively. - Change the email and name in
DEFAULT_FROM_EMAIL
andMANAGERS
in all settings files with your name and email.
-
Run the following commands
python manage.py makemigrations
python manage.py migrate
python manage.py collectstatic
-
Now load the questions, test cases, expected outputs and user submission into the database
python manage.py loaddata questions/fixtures/questions.json