Creating First Django project

arkidem
1 min readJun 15, 2024

--

#day 1st

1.Create a Project Folder: Start by creating a folder where you will set up your Django project. This folder can be named anything you like.

2.Open Terminal: Navigate to the terminal section on your computer.

3.Create a Virtual Environment: Create a virtual environment by using the command:

virtualenv env

4.Activate the Virtual Environment: Activate the environment with the command:

env\scripts\activate

5.Install Django: Install Django within this environment by running:

pip install django

6.Create a Django Project: Create your Django project using the following command (replace projectname with your desired project name):

django-admin startproject projectname

7.Navigate to the Project Directory: Change your directory to your newly created project folder:

cd projectname

8.Open the Project in an IDE: Open your project in your IDE (e.g., VS Code) using:

code .

9.Activate the Virtual Environment in the IDE: Ensure you are using the virtual environment in your IDE terminal

env\Scripts\activate

10.Run the Server: Start the Django development server by running:

python manage.py runserver

11.Access the Project in the Browser: The server will provide URLs at the bottom of the terminal. Clicking on these URLs or copying them into your browser will open your Django project.

--

--