[PR #1314] Show the upgrade notification only in specific views #2886

Closed
opened 2026-03-01 18:01:02 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/ArchiveBox/ArchiveBox/pull/1314

State: closed
Merged: Yes


Summary

This PR adds back the upgrade notification banner that was originally added in #1274 and removed in 4af9bee, but only to specific views instead of the entire admin site, as discussed in #1306.

I wasn't sure for which views we should show the banner, so for now it's only showing on the snapshot view (the page at /admin/core/snapshot/.

The necessary context is provided by overriding the changelist_view method of the SnapshotAdmin model. I think this could work for all views except for the main admin page (/admin/). If we want to pass context to the view for that page, I think we can override the each_context method of ArchiveBoxAdmin instead.

Related issues

#696

Changes these areas

  • Bugfixes
  • Feature behavior
  • Command line interface
  • Configuration options
  • Internal architecture
  • Snapshot data layout on disk
**Original Pull Request:** https://github.com/ArchiveBox/ArchiveBox/pull/1314 **State:** closed **Merged:** Yes --- <!-- IMPORTANT: Do not submit PRs with only formatting / PEP8 / line length changes. --> # Summary This PR adds back the upgrade notification banner that was originally added in #1274 and removed in 4af9bee, but only to specific views instead of the entire admin site, as discussed in #1306. I wasn't sure for which views we should show the banner, so for now it's only showing on the snapshot view (the page at `/admin/core/snapshot/`. The necessary context is provided by overriding the `changelist_view` method of the `SnapshotAdmin` model. I think this could work for all views except for the main admin page (`/admin/`). If we want to pass context to the view for that page, I think we can override the `each_context` method of `ArchiveBoxAdmin` instead. <!--e.g. This PR fixes ABC or adds the ability to do XYZ...--> # Related issues #696 <!-- e.g. #123 or Roadmap goal # https://github.com/pirate/ArchiveBox/wiki/Roadmap --> # Changes these areas - [ ] Bugfixes - [x] Feature behavior - [ ] Command line interface - [ ] Configuration options - [ ] Internal architecture - [ ] Snapshot data layout on disk
kerem 2026-03-01 18:01:02 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#2886
No description provided.