A terminal UI for the Django admin — browse, search, edit, and run admin actions from the terminal.
Project description
dj-admin-tui
A Textual terminal UI that drives the Django admin from your terminal: browse, search, filter, sort, create, edit, delete, and run admin actions — honoring the same permissions and audit log as the web admin, because it reuses Django's own admin internals rather than reimplementing them.
It works with zero configuration: any project that has ModelAdmins gets a
working terminal admin with no extra code. Write a tui.py only when you want
TUI-specific behaviour.
Why
Servers, CI shells, and SSH sessions don't have a browser. dj-admin-tui gives
you the day-to-day admin workflows — find a record, fix a field, run a bulk
action — over a plain terminal, with the exact permission scoping and audit
trail the web admin would apply.
Features
- Reuses the admin, never reimplements it. Querysets, search, filtering,
ordering, pagination, form construction & validation, permissions, actions,
and audit all come from your registered
ModelAdminand Django's own internals. The TUI only renders and adds interaction. - Zero-config. A project with
ModelAdmins and notui.pyworks fully. - Full CRUD — create / edit / delete with the admin's fieldsets, widgets, and validation, including foreign keys, many-to-many, and multi-line text.
- Search, sort, and filter — driven by
search_fields,list_filter, andget_ordering_field_columns, identical to the web changelist. - Admin actions — bulk actions and per-row actions, with confirmation.
- Permission-scoped & audited — every operation runs as a chosen user and
writes
LogEntryrows, exactly like the web admin. - Keyboard and mouse — arrows/Enter or click;
?shows the keymap. - Themeable — bundled themes plus a single-stylesheet design system you can
override with your own
.tcss.
Trust model — read first
The TUI runs in-process as a manage.py subcommand. There is no network
port, no token, no remote API.
Whoever can run
manage.pyon the host already has full database access. The--userflag scopes which records the operator sees and attributes audit entries to that account — it is NOT an access-control boundary. Access control is the host's responsibility (Unix permissions, SSH, etc.).
Install
pip install dj-admin-tui
# settings.py
INSTALLED_APPS += ["dj_admin_tui"]
Launch
python manage.py admin_tui # run as the lone superuser
python manage.py admin_tui --user alice # run as alice (must be is_staff)
You land on an index of every app and model the web admin would show that user.
Arrows + Enter (or the mouse) to drill in, q to quit, ? for help.
Customising (optional)
Drop a tui.py next to your admin.py — it is autodiscovered like admin.py:
# myapp/tui.py
from dj_admin_tui import register, TuiAdmin
@register(Book)
class BookTui(TuiAdmin):
row_actions = ["mark_featured"] # TUI-only per-row actions
The public API is exactly five names; everything else under dj_admin_tui.*
is internal and may change without notice:
from dj_admin_tui import register, TuiAdmin, tui_site, field_widgets, AdminTuiApp
Documentation
Full docs live at dj-admin-tui.readthedocs.io:
| Topic | What it covers |
|---|---|
| Installation | Requirements, install, first launch, trust model |
| Usage | Keymap, mouse map, search / sort / filter, the screens |
| Configuration | The ADMIN_TUI settings dict |
| CLI | The manage.py admin_tui command, flags, exit codes |
| Theming | Bundled themes, custom themes, .tcss overrides |
| Extending | TuiAdmin overlays, hooks, custom widgets & screens |
| API | The public Python API and stability policy |
| Architecture | How it fits together; the reuse-the-admin design |
Supported versions
- Python: 3.12, 3.13, 3.14
- Django: 4.2 LTS, 5.2 LTS, 6.0
- Textual:
>=8.2,<9
See pyproject.toml for the exact ranges.
Contributing
Issues and pull requests are welcome. See CONTRIBUTING.md for the dev setup, test, and lint workflow. Public-API changes follow SemVer with a deprecation path.
License
MIT.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dj_admin_tui-0.0.1.tar.gz.
File metadata
- Download URL: dj_admin_tui-0.0.1.tar.gz
- Upload date:
- Size: 47.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dff73ffe9a588bb8a9e0b516e84ae4959a228fabfe4527d86ba93819708170a6
|
|
| MD5 |
1da8c1947d53d7f888dfd1baa4ea2f3b
|
|
| BLAKE2b-256 |
fedc5311a87708959f8ce610d0da1391a43a3fb3547b6b3adaf22d72f52e2b99
|
Provenance
The following attestation bundles were made for dj_admin_tui-0.0.1.tar.gz:
Publisher:
release.yml on webdastur/dj-admin-tui
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dj_admin_tui-0.0.1.tar.gz -
Subject digest:
dff73ffe9a588bb8a9e0b516e84ae4959a228fabfe4527d86ba93819708170a6 - Sigstore transparency entry: 1702543355
- Sigstore integration time:
-
Permalink:
webdastur/dj-admin-tui@b6763fc6573f4522e8bea65572850563ab7756a2 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/webdastur
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b6763fc6573f4522e8bea65572850563ab7756a2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file dj_admin_tui-0.0.1-py3-none-any.whl.
File metadata
- Download URL: dj_admin_tui-0.0.1-py3-none-any.whl
- Upload date:
- Size: 66.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05a46f242983ac3f9785d08e2119658e017cee18fd74900145067d6c84ff6d88
|
|
| MD5 |
78fecead633b114e491cf772fb9b7a1c
|
|
| BLAKE2b-256 |
579c1a0e11fe47085e500b85926d0224a24c3a70fa0e618d39eca6d24a73211e
|
Provenance
The following attestation bundles were made for dj_admin_tui-0.0.1-py3-none-any.whl:
Publisher:
release.yml on webdastur/dj-admin-tui
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dj_admin_tui-0.0.1-py3-none-any.whl -
Subject digest:
05a46f242983ac3f9785d08e2119658e017cee18fd74900145067d6c84ff6d88 - Sigstore transparency entry: 1702543372
- Sigstore integration time:
-
Permalink:
webdastur/dj-admin-tui@b6763fc6573f4522e8bea65572850563ab7756a2 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/webdastur
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b6763fc6573f4522e8bea65572850563ab7756a2 -
Trigger Event:
push
-
Statement type: