Meet django-vantage: A Django Admin That Configures Itself
说明与用途
django-vantage 是一个 Django 管理后台,能从模型字段自动推断配置,无需为每个模型手动编写 admin.py。包含列表、筛选、搜索、排序、表单组件和查询优化等特性,且可在 UI 中调整设置而无需部署。
问题
Django projects spend time manually configuring admin.py for each model with list_display, list_filter, search_fields, ordering, and list_select_related. This is repetitive and tedious.
结果
django-vantage provides a Django admin that infers columns, filters, search, ordering, form widgets, and query optimization from model fields automatically, requiring zero per-model configuration. Settings can also be changed from the UI without a deploy.
工作流
- Install django-vantage with pip install --pre django-vantage
- Add 'vantage' to INSTALLED_APPS after Django contrib apps
- Mount Vantage's site URLs in urls.py at '/admin/'
- Run python manage.py migrate
- Use vantage_scaffold to inspect or write inferred panel.py for a model
证据
If you've built a few Django projects, you know the routine. You add a model, open admin.py, and type the same things again: list_display, list_filter, search_fields, ordering, list_select_related.
Every model works with zero configuration. When you want something different, you override only that one thing and Vantage keeps inferring the rest.
pip install --pre django-vantage
python manage.py vantage_scaffold shop # print what was inferred
Columns, filters, search, charts, Kanban boards, dark mode and a JSON API, without writing an admin.py.
- 记录日期: 2026-10-26T15:11:36.764Z