1
0
mirror of https://github.com/django/django.git synced 2025-10-26 07:06:08 +00:00

[5.0.x] Fixed #35657 -- Made FileField handle db_default values.

Backport of 8deb6bb1fc from main.
This commit is contained in:
Sarah Boyce
2024-08-05 21:36:49 +02:00
committed by Natalia
parent 333cfab512
commit d7f955462c
4 changed files with 27 additions and 0 deletions

View File

@@ -72,6 +72,9 @@ class Storage(models.Model):
default = models.FileField(
storage=temp_storage, upload_to="tests", default="tests/default.txt"
)
db_default = models.FileField(
storage=temp_storage, upload_to="tests", db_default="tests/db_default.txt"
)
empty = models.FileField(storage=temp_storage)
limited_length = models.FileField(
storage=temp_storage, upload_to="tests", max_length=20