Skip to content

Bump to 2.35.5: explain each django-axes admin page - #1467

Merged
jonfroehlich merged 3 commits into
masterfrom
1460-axes-admin-descriptions
Nov 27, 2026
Merged

jonfroehlich merged 3 commits into
masterfrom
1460-axes-admin-descriptions

Conversation

@jonfroehlich

Copy link
Copy Markdown
Member

Part of #1460. Follow-up to #1466 (admin login throttle), found while testing 2.35.4 on -test.

Why

Access attempts, Access logs and Access failures (Administration, superuser-only) had no description, and their names don't say what they record. These pages get read during a lockout, so each now opens with a short explanation.

What

  • website/templates/admin/axes/change_list.html: one template for all three pages. The admin looks for admin/<app_label>/change_list.html before its default and axes ships no templates, so no ModelAdmin is re-registered. It switches on opts.model_name:
    • Access attempts: usernames building up wrong passwords; 10 in a row locks for 30 min; a correct password clears it, so it's usually empty; how to unlock (delete the row).
    • Access logs: every successful sign-in, with logout time; blank logout means still signed in or session expired; the IP is the CSE proxy's.
    • Access failures: every wrong password, kept after the count resets (up to 1,000 per username); a burst means someone is guessing; unknown usernames are stored as a hash.
  • Styled with the admin's CSS custom properties, so it follows the dark-mode toggle.
  • Tests (test_login_throttle.py): each page shows only its own text; the numbers the text hard-codes (10, 30 min, 1,000) are pinned against settings.
  • Version bump to 2.35.5.

Testing

  • Full suite in the local container: 829 tests pass (after installing two logging packages missing from a stale local image; unrelated).
  • Screenshots: to be checked on -test after merge (UI is a text box under the page title).

🤖 Generated with Claude Code — Opus 5.5, claude-opus-5-5

jonfroehlich and others added 3 commits November 26, 2026 06:43
Access attempts, Access logs and Access failures had no description, and
their names don't say what they record. These pages get read during a
lockout, so each now opens with a short explanation: what the rows are,
how to unlock someone, why the IP is always the proxy's, and why unknown
usernames appear as hashes.

One template, admin/axes/change_list.html: the admin looks for an
app-level changelist template before its default and axes ships none, so
no ModelAdmin is re-registered. Styled with the admin's custom properties
so it follows the dark-mode toggle. Tests check each page shows only its
own text and pin the numbers the text hard-codes (10, 30 min, 1,000).

Part of #1460.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review fixes for #1467, checked against django-axes 9.0.0:
- Access failures: attempts refused during a lockout are never logged,
  so it is not "every wrong password".
- Access attempts: expired rows linger (still "Locked Out") until the
  next sign-in; unlocking means deleting every row for the username
  (rows are per username+IP+user agent), then confirming. Note the
  "(unknown)" hashed usernames here too.
- Access logs: the recorded IP is the server's internal address.
- The numbers test now asserts the rendered text against settings
  instead of pinning settings to exact values.
- Shorter version description.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Access attempts: a lockout sums Failed Logins across a username's
  rows, so no single row may say "Locked Out"; expired rows go the
  next time anyone signs in.
- Access failures: a burst may also be an owner who forgot the password.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jonfroehlich
jonfroehlich merged commit 6688489 into master Nov 27, 2026
3 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.

1 participant