Skip to content

Commit dceaf70

Browse files
authored
Merge pull request #89 from octue/label-styling
FIX: Rename unfold templates to use unfold's field rendering
2 parents f175b94 + 36a86d2 commit dceaf70

File tree

6 files changed

+6
-3
lines changed

6 files changed

+6
-3
lines changed

django_gcp/storage/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def get_readonly_blob_widget(self, obj, field_name):
1616
"download_url": get_signed_download_url(obj, field_name),
1717
"console_url": get_console_url(obj, field_name),
1818
}
19-
return mark_safe(render_to_string("django_gcp/contrib/unfold/cloud_object_readonly_widget.html", context))
19+
return mark_safe(render_to_string("unfold/contrib/django_gcp/cloud_object_readonly_widget.html", context))
2020

2121
def _replace_blob_field_names(self, fields, fields_to_replace):
2222
blob_fields = set(f.name for f in self.model._meta.get_fields() if isinstance(f, BlobField))

django_gcp/storage/blob_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,6 @@ def get_signed_url(self, field_name, expiration=None):
111111
def get_signed_download_url(self, field_name, expiration=None):
112112
"""Get a signed URL to the blob with the response disposition set"""
113113
return get_signed_download_url(self, field_name, expiration)
114+
115+
# def override_path(self, field_name, path):
116+
# """Set a blobfield path manually, avoiding any quality control, checks or ingress"""

django_gcp/storage/widgets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def __init__(
4444
self.ingress_path = ingress_path
4545

4646
if "unfold" in settings.INSTALLED_APPS:
47-
self.template_name = "django_gcp/contrib/unfold/cloud_object_widget.html"
47+
self.template_name = "unfold/contrib/django_gcp/cloud_object_widget.html"
4848

4949
def get_context(self, name, value, attrs):
5050
context = super().get_context(name, value, attrs)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "django-gcp"
3-
version = "0.18.3"
3+
version = "0.18.4"
44
description = "Utilities to run Django on Google Cloud Platform"
55
authors = ["Tom Clark"]
66
license = "MIT"

0 commit comments

Comments
 (0)