Follow these steps to set up your Django project environment, start your project, and perform initial configurations:
-
Open Command Prompt (CMD): Press
Win + R, typecmd, and hitEnter. -
Navigate to Your Project Folder:
cd django\inmest_app_api
-
Create a Virtual Environment:
python -m venv my_nenv
-
Activate the Virtual Environment:
- On Windows:
my_nenv\Scripts\activate
- On Windows:
- Install Django:
python -m pip install Django
- Create Your Django Project:
Note: The period (
django-admin startproject inmest_2024_api ..) at the end of the command specifies that the project should be created at the current directory's root.
-
Start the Server:
python manage.py runserver
-
Navigate to the Admin Dashboard:
- Open your web browser and go to
http://127.0.0.1:8000/admin
- Open your web browser and go to
-
Create Migrations for Your Models:
python manage.py makemigrations
-
Apply Migrations:
python manage.py migrate
- Create a Superuser Account:
python manage.py createsuperuser
- Follow the prompts to set up a username, email, and password for the superuser account.