Releases: octue/django-gcp
Use unfold's field rendering
Add a `get_bucket_name` method to blob field utils
<!-- PRs into main are released as soon as they are merged. Their descriptions will be used directly to create release notes, so make sure they contain everything! --> <!-- Anything added between the auto-generation marker comments will be replaced on every pushed commit, so make sure to add anything you want to add outside of them. --> <!-- However, any part of the final PR description (i.e. the description at the point of the final commit to the PR) can be changed in release notes after release if required --> <!-- Change "START" to "SKIP" in the autogeneration marker to stop any further automatic changes to the description. ---> <!--- START AUTOGENERATED NOTES ---> <!--- END AUTOGENERATED NOTES --->
Add get_bucket classmethod to BlobFieldMixin
<!-- PRs into main are released as soon as they are merged. Their descriptions will be used directly to create release notes, so make sure they contain everything! --> <!-- Anything added between the auto-generation marker comments will be replaced on every pushed commit, so make sure to add anything you want to add outside of them. --> <!-- However, any part of the final PR description (i.e. the description at the point of the final commit to the PR) can be changed in release notes after release if required --> <!-- Change "START" to "SKIP" in the autogeneration marker to stop any further automatic changes to the description. ---> <!--- START AUTOGENERATED NOTES ---> <!--- END AUTOGENERATED NOTES --->
Fix signature mismatch bug due to max size bytes header
Summary
In the previous release 0.18.0, the addition of the X-Goog-Content-Length-Range
header was "fixed". Previously it had been incorrectly added and was thus always missing.
However, this header must be identically both:
- Encoded into signature generation and
- Set on the upload request
The "fix" in 0.18.0 added it into the encoding of the signature generation but did not set it on the upload request. The resulting code caused errors in all uploads using the widget.
This release fixes that problem by clarifying the default value and ensuring that the correct header is set on upload. In the event that the requested max_size_bytes is 0, the upload size is unlimited.
This release adds a setting GCP_STORAGE_BLOBFIELD_MAX_SIZE_BYTES
allowing you to set a maximum for all your blobfields. However, to avoid a breaking change, the default is set to 0 (unlimited).
Add uploaded_blob context manager, allow calling of model clean() with overridden settings
Contents (#84)
New features
- Add uploaded_blob context manager, useful for unit testing
Fixes
- Allow field cleaning to happen inside an overridden context
- Correct implementation of headers for limiting content length range
- Make upload_blob woth with default destination path helper
Operations
- Remove deprecated setting from devcontainer json
Refactoring
- Remove redundant context in test
Testing
- Test uploaded_blob context manager
Export BlobField from `django-gcp.storages`
Access ingress path
Contents (#80)
IMPORTANT: There is 1 breaking change.
New features
- Add update_attributes callback for setting blob metadata
Fixes
- Avoid save on unrefreshed object
Refactoring
- 💥 BREAKING CHANGE: Move upload_blob to the operations module where it belongs
Testing
- Fix race condition from transaction handler
Upgrade instructions
💥 Move upload_blob to the operations module where it belongs
If importing the upload_blob function from django_gcp.storage.blob_utils, import directly from django_gcp.storage.operations or django_gcp.storage instead
Add complete method list to the blob field mixin
What's Changed
Full Changelog: 0.16.0...0.16.1
Read Only Widget
Contents (#78 and #77)
IMPORTANT: There is 1 breaking change.
New features
- Add utils to easily work with blobs
- 💥 BREAKING CHANGE: Add readonly widget and complete demo in admin
Fixes
- Correctly surface ValidationErrors
- Widget correctly accepts download_url and console_url
- Fix poetry lock
Operations
- Add useful aliases
- Ignore django static files
Fixes
- Poetry installation
Upgrade instructions
💥 Add readonly widget and complete demo in admin
Determination of the kmz destination path is now executed during the model full_clean()
rather than on save()
(so that any ValidationError can be surfaced gracefully to the admin), so any instance fields used to determine the kmz path must be populated prior to that point.
Move blob utils to correct place
BREAKING-CHANGE: Moved erroneously-located blob utilities. Import blob utilities from django_gcp.storage not django_gcp.tasks.
Contents (#75)
IMPORTANT: There is 1 breaking change.
Refactoring
- 💥 BREAKING CHANGE: Move blob utils to correct place
Upgrade instructions
💥 Move blob utils to correct place
Moved erroneously-located blob utilities. Import blob utilities from django_gcp.storage not django_gcp.tasks.