π§ Django Small Notes (Beginner-Friendly)
β
What is Django?
Django is a Python web framework.
It helps you build websites and web apps quickly.
It comes with built-in features like user login, admin panel, database management, etc.
π§ Step-by-Step Setup
1. Check Python
bash
python --version
2. Create Virtual Environment
bash
python -m venv venv
3. Activate the Environment (Windows)
bash
venv\Scripts\activate
4. Install Django
bash
pip install Django
5. Check Django Version
bash
django-admin --version
6. Create Django Project
bash
django-admin startproject myapp
7. Go into the project folder
bash
cd myapp
8. Run the development server
bash
python manage.py runserver
9. Apply Migrations (very important!)
bash
python manage.py migrate
π What These Commands Do:
venv\Scripts\activate β Activates virtual environment
startproject β Creates new Django project
runserver β Starts local web server
migrate β Creates tables in your database
createsuperuser β Creates admin login
π Default Django URL
After running the server, open:
cpp
http://127.0.0.1:8000/
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)