๐ Django Tutorial – Module 1
Topic: Introduction & Environment Setup
๐ฏ Learning Objectives
- Understand what Django is
- Install Django
- Create virtual environment
- Run first Django server
๐น Step 1: Create Virtual Environment
python -m venv venv
venv\Scripts\activate
๐น Step 2: Install Django
pip install django
๐น Step 3: Verify Django Installation
django-admin --version
๐น Step 4: Create Django Project
django-admin startproject mysite
cd mysite
python manage.py runserver
๐ Output
Open browser and visit:
http://127.0.0.1:8000/
๐งช Student Practice
- Change server port to 9000
- Stop and restart the server
❓ Viva Questions
- What is Django?
- Why do we use virtual environment?
- What is the purpose of manage.py?
No comments:
Post a Comment