β How to Create a Django Project π§ 1. Install Python (if not installed) Make sure Python 3.8+ is installed. Check with: python --version If not installed, download from python.org . π¦ 2. Set up a Virtual Environment (Recommended) # Create a new directory for your project mkdir myproject cd myproject # Create virtual environment python -m venv env # Activate it # On Windows: env\Scripts\activate # On macOS/Linux: source env/bin/activate π₯ 3. Install Django With your virtual environment activated, install Django: pip install django You can check Django is installed with: django-admin --version π 4. Create a New Django Project django-admin startproject myproject . myproject is your project name. The dot (.) tells Django to create the files in the current directory. This creates: myproject/ βββ manage.py βββ myproject/ β βββ __init__.py β βββ settings.py β βββ urls.py β βββ wsgi.py π 5. Run the Development Server To check that everything works: python manage.py runserver Then open your browser and go to: http://127.0.0.1:8000/ You should see the default Django welcome page. π§± 6. Create a Django App (Optional but Common) A project can have multiple apps (blog, accounts, etc.) python manage.py startapp myapp Then add 'myapp' to INSTALLED_APPS in myproject/settings.py. π 7. (Optional) Create a Requirements File To track dependencies: pip freeze > requirements.txt β Summary of Key Commands # Create & activate virtual environment python -m venv env env\Scripts\activate # (or source env/bin/activate on macOS/Linux) # Install Django pip install django # Start Django project django-admin startproject myproject . # Run the server python manage.py runserver ========================================= β Steps to Add and Display HTML Pages in Django π§± 1. Create a Django App (if you haven't already) If you havenβt already created an app, run: python manage.py startapp pages Then add the app to INSTALLED_APPS in settings.py: # myproject/settings.py INSTALLED_APPS = [ ... 'pages', ] π 2. Create the Templates Folder and HTML Files Inside your pages app, do the following: π Folder Structure myapp/ βββ templates/ β βββ pages/ β βββ home.html β βββ about.html βββ views.py βββ urls.py β you'll create this ... π Example home.html