#24510: FileField.upload_to documentation misleading
--------------------------------------+--------------------
     Reporter:  mbertheau             |      Owner:  nobody
         Type:  Cleanup/optimization  |     Status:  new
    Component:  Documentation         |    Version:  master
     Severity:  Normal                |   Keywords:
 Triage Stage:  Unreviewed            |  Has patch:  0
Easy pickings:  0                     |      UI/UX:  0
--------------------------------------+--------------------
 In
 
https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.FileField.upload_to
 it says:

 > A local filesystem path that will be appended to your MEDIA_ROOT setting
 to determine the value of the url attribute.

 While this may be true with the default storage, it's misleading because
 it suggests that this behaviour (append to MEDIA_ROOT to get the URL)
 can't be changed. It's also the first sentence and main explanation for
 `upload_to`, which increases the severity of the misleading.

 In particular, you might want to make uploaded files not available to the
 general public, i.e. use a storage with `base_url` set to `None`. The
 first sentence sounds like you have to hack around django to implement
 that.

--
Ticket URL: <https://code.djangoproject.com/ticket/24510>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.57a99ef603c6647af45c7a0ce88ca281%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to