Skip to content

Commit 986774a

Browse files
authored
feat: ✨ Make file blob contents editable (hacktoolkit#432)
To make the files editable in the Django admin this small addition needed. `editable` option is `False` by default for `BinaryField`
1 parent bf3e5f8 commit 986774a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/blob_storage/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ class AbstractBlobStorage(models.Model):
1414
content_type = models.CharField(max_length=64, blank=True)
1515
size_bytes = models.PositiveIntegerField(default=0)
1616
contents = CompressedBinaryField(
17-
max_length=htk_setting('HTK_BLOB_CONTENT_MAX_LENGTH')
17+
max_length=htk_setting('HTK_BLOB_CONTENT_MAX_LENGTH'),
18+
editable=True
1819
)
1920

2021
class Meta:

0 commit comments

Comments
 (0)