Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show the upgrade notification only in specific views #1314

Merged
merged 2 commits into from
Jan 23, 2024

Conversation

benmuth
Copy link
Contributor

@benmuth benmuth commented Jan 9, 2024

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

@pirate
Copy link
Member

pirate commented Jan 19, 2024

Can you post a screenshot of what this looks like in the UI?

@benmuth
Copy link
Contributor Author

benmuth commented Jan 21, 2024

Here's what it looks like for me: image

@pirate
Copy link
Member

pirate commented Jan 23, 2024

Awesome, thanks.

@pirate pirate merged commit c7cab7c into ArchiveBox:dev Jan 23, 2024
@benmuth benmuth deleted the specific-version-banner branch March 15, 2024 23:14
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