mirror of
https://github.com/django/django.git
synced 2025-12-15 21:45:20 +00:00
Refs #28428 -- Made FileField.upload_to support pathlib.Path.
This commit is contained in:
parent
af69842dbd
commit
d1c2e6dd04
5 changed files with 14 additions and 4 deletions
|
|
@ -38,6 +38,7 @@ class Storage(models.Model):
|
|||
normal = models.FileField(storage=temp_storage, upload_to='tests')
|
||||
custom = models.FileField(storage=temp_storage, upload_to=custom_upload_to)
|
||||
pathlib_callable = models.FileField(storage=temp_storage, upload_to=pathlib_upload_to)
|
||||
pathlib_direct = models.FileField(storage=temp_storage, upload_to=Path('bar'))
|
||||
random = models.FileField(storage=temp_storage, upload_to=random_upload_to)
|
||||
custom_valid_name = models.FileField(
|
||||
storage=CustomValidNameStorage(location=temp_storage_location),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue