Python's two big web frameworks. Django is "batteries-included" with an ORM, admin and auth out of the box; Flask is a tiny, flexible micro-framework you grow piece by piece.
Flask maps a URL to a Python function with the @app.route decorator. Type a path and "request" it — the simulated dev server matches a view and replies.
/, /hello/<name>, /api/timefrom flask import Flask, jsonify app = Flask(__name__) @app.route('/hello/<name>') def hello(name): return f'Hello, {name}!' @app.route('/api/time') def api_time(): return jsonify(time='12:00:00')
Django's ORM turns Python method chains into SQL. Pick a queryset and watch the simulated Article table respond — plus the SQL Django would generate.
You describe your data as a Python class; Django generates the database schema. Click to run makemigrations + migrate and watch it work.
# blog/models.py class Article(models.Model): title = models.CharField(max_length=200) status = models.CharField(max_length=20) views = models.IntegerField(default=0) created = models.DateTimeField(auto_now_add=True)
Register a model and Django builds a full CRUD admin UI for free. This is a simulated peek at what auto-generates.
admin.py:admin.site.register(Article)Same language, opposite philosophies.
Full-stack & opinionated. ORM, admin, auth, forms and templates included. Great for content sites, dashboards and large teams that want convention.
Minimal & flexible. Start with just routing; add an ORM (SQLAlchemy), forms etc. only when you need them. Great for small APIs and microservices.