#35057: [Feature request] Add a setting for project level callable/string for
FileField's upload_to
-------------------------------------+-------------------------------------
     Reporter:  Vasanth              |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  Files, models,       |             Triage Stage:
  storage                            |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Description changed by Vasanth:

Old description:

> On the FileField, we have the option to define the default storage that
> the project uses globally with the option to override it at a field level
> manually.
>
> It would be great to extend the same functionality to the upload_to
> argument as well. In some projects, we do find ourselves manually
> overriding it for every file & image field and it is one more check to
> remember / check during PRs.
>
> It would be great if we could define a DEFAULT_UPLOAD_TO =
> "callable_or_string" so that it simplifies working on a project when
> collaborating with others

New description:

 On the FileField, we have the option to define the default storage that
 the project uses globally with the option to override it at a field level
 manually.

 It would be great to extend the same functionality to the upload_to
 argument as well. In some projects, we do find ourselves manually
 overriding it for every file & image field and it is one more check to
 remember / check during PRs.

 It would be great if we could define a DEFAULT_UPLOAD_TO =
 "callable_or_string" so that it simplifies working on a project when
 collaborating with others

 I did it ask around the forum and was told having a custom field was the
 only way to go at the moment (ref: https://forum.djangoproject.com/t
 /settings-upload-to-at-project-level-settings/26334)

--

-- 
Ticket URL: <https://code.djangoproject.com/ticket/35057#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018c8d2f6b5e-47dc1826-c852-4758-8a91-07b13b0999a5-000000%40eu-central-1.amazonses.com.

Reply via email to