Overview
Version 9.0.1 is a patch release that fixes issues with the "Add Attachment" button functionality and improves the redirect behavior after creating attachments.
What's Changed
New Contributors
Bug Fixes
- Fixed Add Attachment Button Redirect: The "Add Attachment" button now correctly redirects users to the attachment list view for the specific object after creating an attachment, instead of returning to the general object detail page
- Improved Error Handling: Added exception handling in the add attachment button rendering to gracefully handle any rendering failures
- Removed Unnecessary Import: Cleaned up unused static file import in the generic tab list template
Changes
-
Template Content Logic: Refactored the attachment button and tab view registration to properly pass the URL pattern name for correct redirection
- The
register_attachment_tab_view()function now returns the registered view name - The
create_add_attachment_button()function now accepts and uses the URL pattern name for proper routing
- The
-
Add Attachment Button Template: Enhanced with conditional logic to handle both standard and fallback redirect scenarios
- Uses the attachment list view URL when available
- Falls back to the current page request path if URL pattern is unavailable
-
Views: Added support for preserving the
return_urlparameter when using the "Add Another" feature in the attachment creation form, and set a default return URL for the delete view
Full Changelog: 9.0.0...v9.0.1