This guide will walk you through the steps to set up the project environment, install dependencies, run the backend server, create a superuser for Django admin, and set up environment variables.
- Python version >= 3
-
Create a New Directory: Open a terminal and navigate to the directory where you want to create the project.
-
Create a Virtual Environment: Run the following command to create a new Python virtual environment:
python3 -m venv myenv
Activate the Virtual Environment: Activate the virtual environment using the appropriate command for your operating system:On Windows:
myenv\Scripts\activate
On Unix/macOS:
source myenv/bin/activate
git clone <repository-url>
cd <project-directory>
pip install -r requirements.txt
python manage.py runserver
python manage.py createsuperuser
- Create a .env File: Create a new file named .env in the root directory of your project.
- Add Variables: Add all the environment variables required for your project to the .env file in the format VARIABLE_NAME=value