#26562: Introduce Storage and FileSystemStorage alternate save behaviour
-------------------------------------+-------------------------------------
     Reporter:  freshquiz            |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  File                 |                  Version:  master
  uploads/storage                    |
     Severity:  Normal               |               Resolution:
     Keywords:  file FileField       |             Triage Stage:  Accepted
  storage overwrite filepath         |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by freshquiz):

 I don't like the idea of piling up configuration mechanisms.

 Fair enough.

     There's already a setting for selecting the storage backend.

 Yes, I am currently using this to implement the desired behaviour using
 subclasses, but there are two problems with putting the responsibility on
 the client:
 * Code has to be duplicated from the `FileSystemStorage._save()` method,
 in order to override it with the desired behaviour.
 * These overriding subclasses will be duplicated by every other client who
 wants the desired behaviour.

 How do you propose introducing the behaviour natively as a non-default
 option, without breaking backwards compability and without a configuration
 option?

--
Ticket URL: <https://code.djangoproject.com/ticket/26562#comment:8>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.de9957bea1bfa749d91db4c7ac2f1256%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to