Django Arena is a competition platform where users(in particular djangists) can duel and compete in writing django code.
The project contains two parts: the main application and an application for testing and scoring tasks submissions during a duel.
required python version - 3.9 or higher
required django version - 4.2
Django Arena uses Redis, so its installation is required
-
Install redis using package manager
sudo apt-get install redis-server
-
Run redis-server
sudo service redis-server start
-
Install the zip file from gihub
- Unzip the file
- Go to the directory and open a file named redis-server
-
Install project to your pc using
git clone https://gitlab.crja72.ru/django/2024/spring/course/projects/team-5.git
-
Go to the project directory
cd DjangoArena
-
Create virtual environment
python3 -m venv venv
-
Activate your virtual environment
source venv/bin/activate
venv/Scripts/activate
-
Install dependencies you need to run app
For production install
pip install -r requirements/prod.txt
For development install
pip install -r requirements/dev.txt
For testing install
pip install -r requirements/test.txt
-
Create .env file and add there data that you need (you can see how to configure .env in the test .env.template file in the root of the project)
cp .env.template .env
Important: You must have Redis server running for the application to work
-
Go to the main application directory
cd django_arena
-
Make and apply migrations:
python3 manage.py makemigrations python3 manage.py migrate
-
Run the main application:
python3 manage.py runserver
-
Open a new terminal window and go to the application for testing directory
cd django_arena_testing
-
Activate your virtual environment
source venv/bin/activate
venv/Scripts/activate
-
Apply default django migrations:
python3 manage.py migrate
-
Run the application for testing:
python3 manage.py runserver 8001 --noreload