Preparing for Django:
- In our Web Development Unit, we’ll be using Django, a Python framework for building web applications.
- To get ready, install Django on your computer before we start, then run the check below to confirm it works.
Step 1: Install Django (Windows):
- Open the VS Code terminal and run:
1pip install Django==6.1Alternative for Windows users: you can also use the Python Launcher for Windows (py). The launcher is a small program that the standard python.org installer puts on your computer. It doesn’t run code itself. Its job is to find the Python installations on your machine and hand your command off to the right one.
1py -3.14 -m pip install Django==6.1
Step 1: Install Django (Mac):
- Open the VS Code terminal and run the command below. Use pip3, not pip.
1pip3 install Django==6.1Step 2: Confirm That Django Is Installed Correctly:
- Create a new folder, open it in VS Code, and run the command below in the terminal (don’t forget the period at the end):
1django-admin startproject myprj .- Look for the new files. After the command runs, the folder should contain:
myprj/ __init__.py asgi.py settings.py urls.py wsgi.py manage.py