$ show otto-torino/django-baton
django-baton is a Django application that transforms the built-in admin interface with a modern, customizable UI. It provides a configurable menu, button themes, form tabs, custom list filters, changelist includes, integrated AI features (translation, summarization, correction, image alt-text and subject location), and an autodiscover admin site. The architecture is a Django reusable app with a Python backend (views, models, filters, templates, and template tags) and a frontend built with Webpack, SCSS, and JavaScript that overlays the admin HTML via signals and template overrides. Key entry points are the `BatonAdminSite` (which auto-registers all models) and the JSON endpoints for menu and AI operations (e.g., `/baton/ai/translate/`). External dependencies include Django, requests (for AI API calls to `baton.sqrt64.it`), and optional rich-text editor integrations. The codebase demonstrates solid craftsmanship with reusable patterns like custom admin filters, a pluggable AI editor adapter, and a config-driven theme system, but some parts are tightly coupled to Baton's global configuration.
The LLM identified 1 files worth highlighting for reuse:
Contains three custom admin filter classes (`InputFilter`, `DropdownFilter`, `MultipleChoiceListFilter`) that extend `SimpleListFilter`. These provide reusable patterns for adding modern filter widgets to Django admin changelists with minimal coupling: each class overrides `filter_queryset` and `value` methods and renders via a dedicated template. Any Django project can copy these classes and the associated templates (`baton/templates/baton/filters/`) to get rich filter UIs without additional dependencies.