A well-structured repository covering Django, Flask, and REST APIs — built for learning, revision, and practical viva preparation.
This repo focuses on core backend concepts, clear explanations, and exam-ready clarity.
- Django – Full-featured Python web framework
- Flask – Lightweight micro web framework
- REST API – Stateless backend communication standard
Django is a high-level Python web framework that follows the MVT (Model–View–Template) architecture and enables rapid development of secure, scalable, database-driven web applications.
- Model → Database layer (ORM)
- View → Business logic & request handling
- Template → Presentation layer (HTML)
- Built-in ORM
- Admin panel
- Authentication & authorization
- Security (CSRF, XSS, SQL injection protection)
- Rapid development
models.py→ Database schemaviews.py→ Application logicurls.py→ URL routingsettings.py→ Project configurationmanage.py→ Command-line utility
makemigrations→ Create migration filesmigrate→ Apply changes to database
Flask is a lightweight (micro) Python web framework used to build web applications and REST APIs.
Flask provides only core features like routing and request handling.
Additional functionality is added using extensions.
@app.route()→ URL routing- View functions → Handle requests
render_template()→ Render HTML templatesrequest→ Client request datajsonify()→ JSON responses- Jinja2 → Template engine
- Simple and flexible
- Easy to learn
- Ideal for APIs and small to medium projects
- No built-in ORM
- No admin panel
- Requires manual structure and security setup
API (Application Programming Interface) allows communication between two applications.
REST (Representational State Transfer) is an architectural style that uses HTTP to manage resources.
A REST API uses HTTP methods to perform operations on resources in a stateless manner.
| Method | Operation |
|---|---|
| GET | Fetch data |
| POST | Create data |
| PUT | Update data |
| DELETE | Remove data |
- Stateless
- Client-server architecture
- Uses JSON for data exchange
| Code | Meaning |
|---|---|
| 200 | OK |
| 201 | Created |
| 400 | Bad Request |
| 401 | Unauthorized |
| 404 | Not Found |
| 500 | Server Error |
- Django → Django REST Framework (DRF)
- Flask → Flask routes +
jsonify()/ Flask-RESTful
| Django | Flask |
|---|---|
| Batteries-included | Lightweight |
| Opinionated | Flexible |
| Built-in ORM & Admin | Extension-based |
| Best for large systems | Best for APIs & small apps |
- Django follows MVC ❌
- Flask follows MVT ❌
- REST is a protocol ❌
- GET modifies data ❌
- Flask has built-in admin ❌
- Django is structured and full-featured
- Flask is flexible and minimal
- REST APIs are stateless and resource-based
- Django + Flask + REST form a strong backend foundation
- B.Tech / MCA students
- Backend beginners
- Django & Flask learners
- Practical viva preparation
- Revision before exams or interviews
Built with focus, clarity, and real understanding
by Manish Srivastav