Skip to content

v0.4.1.0: admin About page (app / base versions, release dates) - #25

Merged
tanhtm merged 4 commits into
main2.0from
claude/nifty-lamport-zvjnpd
Oct 16, 2026
Merged

tanhtm merged 4 commits into
main2.0from
claude/nifty-lamport-zvjnpd

Conversation

@tanhtm

@tanhtm tanhtm commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds an About page to the admin (/admin/about/, sidebar System → About / Hệ thống → Thông tin ứng dụng). It shows which version of the application and of django-whiteneuron is running, and when each was released. This PR also cuts release v0.4.1.0.

Card Who sees it Content
Application version / Base version all staff both versions with their release dates
Application all staff NAME, VERSION, RELEASE_DATE, BUILD_ID (cut to 12 characters), rows from APP_INFO_CALLBACK
Base platform all staff django-whiteneuron version, release date, changelog link
Runtime superusers Python / Django / Unfold versions, database engine, debug mode, time zone, server time, process start, uptime

Settings (all optional)

  • RELEASE_DATE (env, ISO date)
  • BUILD_ID (env, falls back to GIT_COMMIT)
  • APP_INFO_CALLBACK (settings only, func(request) -> [(label, value), ...]). These rows are visible to all staff, so the docs warn against returning secrets. If the callback raises, the error is logged and its rows are skipped.

Information disclosure

These are never shown to anyone: host name, OS/kernel, CPU architecture, IP addresses, paths, database server version, connection settings, cache backend, or the dependency list. Runtime details and debug mode are visible to superusers only. Tests enforce this.

Other changes

  • whiteneuron.__version__ / __release_date__ added. A test keeps them in sync with pyproject.toml and CHANGELOG.md.
  • Dates and uptime are localized. Django's timesince has no Vietnamese translation, so the package formats the uptime itself with its own msgids.
  • Vietnamese translations added; compiled CSS rebuilt for the new templates.
  • Release: version 0.4.1.0 in pyproject.toml, uv.lock, __init__.py, CHANGELOG.md, README.md. Release notes are in docs/reports/releases/2026-10-16-v0.4.1.0.md.

Upgrade

pip install -U django-whiteneuron==0.4.1.0, then collectstatic. No migrations. Projects that define their own UNFOLD["SIDEBAR"] need to add the link themselves: reverse_lazy("admin:about").

Test plan

  • manage.py test whiteneuron: 57 tests pass (9 new in base/tests_about.py)
  • check clean; makemigrations --check reports no changes
  • msgfmt --check; makemessages leaves no untranslated or fuzzy entries
  • Tailwind build reproducible (matches the committed CSS)
  • uv build: the wheel includes the new module and templates
  • Checked in Chromium as staff and as superuser, in Vietnamese and English, light and dark, desktop and 390px

🤖 Generated with Claude Code

https://claude.ai/code/session_01WwbZYokwaW48quNjW9XBCX


Generated by Claude Code

/admin/about/ (sidebar System -> About) shows the application version,
release date and build (VERSION, RELEASE_DATE, BUILD_ID, extra rows from
APP_INFO_CALLBACK) and the django-whiteneuron version and release date.
Superusers also see runtime details (Python, OS, host, database, cache,
uptime) and dependency versions.

whiteneuron.__version__ / __release_date__ are defined and checked
against pyproject.toml and CHANGELOG.md. Vietnamese translations and
compiled CSS updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwbZYokwaW48quNjW9XBCX
Review of the About page with sensitive data in mind:
- runtime card (superusers) no longer shows host name, OS/kernel,
  database server version, cache backend or the dependency list;
  it keeps Python/Django/Unfold versions, database engine, debug mode,
  time zone, server time and uptime
- debug mode moved from the staff-visible card to the superuser card
- BUILD_ID is cut to 12 characters
- APP_INFO_CALLBACK is a setting only (no import path from the
  environment); docs warn that its rows are visible to all staff
- process start time comes from psutil (was the first page view) and
  the uptime is translated (Django's timesince has no Vietnamese)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwbZYokwaW48quNjW9XBCX
Unfold's card `icon` option places a large icon past the card's left
edge, so overflow-hidden cut it in half. The headline cards now use a
tinted icon tile next to the text (shared about_stat.html), and the
Base platform card no longer reuses the "layers" icon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwbZYokwaW48quNjW9XBCX
- version 0.4.1.0 (2026-10-16) in pyproject.toml, uv.lock,
  whiteneuron/__init__.py, CHANGELOG.md and README.md
- release notes docs/reports/releases/2026-10-16-v0.4.1.0.md
- base version on the About page is whiteneuron.__version__ (the code
  that runs), so it always matches __release_date__ on editable installs
- non-string BUILD_ID no longer raises (was a 500)
- Vietnamese catalog: duplicate fuzzy flag lines on the uptime plurals
  removed by makemessages

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WwbZYokwaW48quNjW9XBCX
@tanhtm
tanhtm merged commit 8c81be6 into main2.0 Oct 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants