Django 是一个高级 Python web 框架,鼓励快速开发和简洁、务实的设计。它是一个"batteries-included"框架 — 它开箱即用地提供了几乎所有构建 web 应用程序所需的东西,遵循定义明确的约定。
Batteries-included: 内置功能
text
✓ ORM — work with the database using Python, not raw SQL
✓ Admin site — an auto-generated admin interface for your data
✓ Authentication— users, permissions, sessions, login
✓ Forms — validation and rendering
✓ Templates — a templating engine for HTML
✓ Migrations — version-controlled database schema changes
✓ Security — CSRF, XSS, SQL-injection protections by default
✓ Routing, caching, i18n, and more
与最小化框架(Flask、FastAPI)不同,在这些框架中你需要自己组装各个部分,Django 提供了一个集成、统一的堆栈 — 所以你构建功能,而不是基础设施。
