Skip to content

Commit 8932034

Browse files
authored
Merge pull request #19 from octue/fix/add-bucket-name
FIX: Add bucket name property to remedy backward compatibility
2 parents 4ed53b4 + bc3c862 commit 8932034

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

django_gcp/storage/gcloud.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,15 @@ def bucket(self):
135135
self._bucket = self.client.bucket(self.settings.bucket_name)
136136
return self._bucket
137137

138+
@property
139+
def bucket_name(self):
140+
"""The name of the bucket corresponding to this store
141+
142+
A convenience property referring to self.settings.bucket_name but here for backward compatibility
143+
with django_storages and ease of general use
144+
"""
145+
return self.settings.bucket_name
146+
138147
def _normalize_name(self, name):
139148
"""
140149
Normalizes the name so that paths like /path/to/ignored/../something.txt

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.7.1"
3+
version = "0.7.2"
44
description = "Utilities to run Django on Google Cloud Platform"
55
authors = ["Tom Clark"]
66
license = "MIT"

0 commit comments

Comments
 (0)