Create Project Directory

Creating a project directory is the first step for starting an app development project. You can create it in your home directory, on your desktop, or in other locations on your computer. Developing a web application using Django will be done in this project directory throughout this course. Many new directories or files will be added to the project directory along with your app development process.

Create a project directory with VS Code

You can use VS Code to create a new project directory. Here is the guide to creating a new project directory with VS Code.

  1. Click on the document icon on the top left and press the Open Folder button.
Create a project directory with VS Code: Step 1
  1. Press the New Folder button in the directory selection screen.
Create a project directory with VS Code: Step 2
  1. Type a project name (e.g., project_d) and press the Create button.
Create a project directory with VS Code: Step 3
  1. When opening the directory that you created, you may be asked if the directory (folder) can be trusted. Select the Yes button to open the directory.
Create a project directory with VS Code: Step 4
  1. You'll see that the project directory has been created like shown below
Create a project directory with VS Code: Step 5

Open Terminal

For the following sections, you'll need to use Terminal. To open the terminal, click on 'Terminal' in the top menu bar and select 'New Terminal'

Open Terminal in VS Code 1

You can see that a new terminal is opened with the project directory as the current working directory.

Open Terminal in VS Code 2

IdeaTips: Start VS Code with drag and drop

You can also create a new project directory with your Mac OS or Windows and open it with VS Code. Here are the steps for Mac OS.

1. Create a new folder by right-clicking on your desktop.

Start VS Code with drag and drop: Step 1

2. Change the folder name.

Start VS Code with drag and drop: Step 2

3. Drag and drop the folder onto the VS Code icon.

  • For Mac: use the VS Code icon in the Dock.
  • For Windows: use the VS Code icon on the desktop.
Start VS Code with drag and drop: Step 3

4. You can see that the project directory is opened with VS Code

Start VS Code with drag and drop: Step 4