Ensure you have Python3.12 and pip installed on your machine. You can verify your installation by running:
python --version pip --version
Using a virtual environment is recommended to manage the project dependencies separately. Here's how you can set it up:
If you do not have virtualenv
installed, you can install it using pip:
pip install virtualenv
Navigate to your project directory and create a new virtual environment:
virtualenv venv
Activate the virtual environment:
-
On Windows:
venv\Scripts\activate
-
On macOS and Linux:
source venv/bin/activate
With the virtual environment activated, install the project dependencies from the requirements.txt
file:
pip install -r requirements.txt
Before you can run the server, ensure that your database is up to date with the latest migrations:
- Navigate to the directory containing
manage.py
. - Run the following commands to make and apply migrations:
python manage.py makemigrations
python manage.py migrate
To start the Django development server, execute:
python manage.py runserver
This command starts the server on the default port 8000
. If you want to use a different port:
python manage.py runserver 8080
Open your web browser and navigate to http://127.0.0.1:8000/
to view the application.