CP Drills (Competitive Programming Drills) is a training platform designed to help increase your problem-solving speed by giving you access to several analytics. I no longer host the website, so its source code is publicly available to be run locally! You can look at the platform temporarily hosted here but it is likely that you cannot access practice features here. You can download and run the code locally by following the usage guide.
If you fork this repository and work on your own version, I ask that you link this repository at the start of your README to give credit.
- Clone this repository, create a python virtual environment, and install the requirements:
$ pip install -r requirements.txt
- Create a
.env
file usingenv_template.txt
and fill in the required fields. - Initialise the database:
$ python manage.py migrate
$ python manage.py makemigrations
- Create a super user to login to the website:
$ python manage.py createsuperuser
- Run the FastAPI server used to query the Codeforces API:
$ uvicorn cf_api_server:app --host 0.0.0.0 --port 8080
- Start the django app in the cpdrills directory:
$ cd cpdrills
$ python manage.py runserver
- Open the website, login with your superuser account, and add your Codeforces handle to your profile. You may need to navigate to /admin and update your superuser profile's details if you cannot directly save your profile.
Note: If something breaks, it is likely that a path or URL needs to be updated. Just follow the error and change the required paths. Check the FastAPI endpoint.