#26029: Provide an API to configure arbitrary file storage backends
------------------------------------------------+------------------------
Reporter: aaugustin | Owner: nobody
Type: New feature | Status: new
Component: File uploads/storage | Version: master
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
Currently Django has two hardcoded file storage backends, "default" (for
media files) and "static" (for static files). Idioms for configuring file
storage backends in pluggable apps are cumbersome.
It would be nice to be able to configure arbitrary file storage backends,
like caches and databases e.g.:
{{{
FILE_STORAGES = {
'media': {
'BACKEND': settings.DEFAULT_FILE_STORAGE,
'OPTIONS': {
'location': settings.MEDIA_ROOT,
'base_url': settings.MEDIA_URL,
# possible override of settings.FILE_CHARSET
},
},
'static': {
'BACKEND': settings.STATICFILES_STORAGE,
'OPTIONS': {
'location': settings.STATIC_ROOT,
'base_url': settings.STATIC_URL,
# replacement for STATICFILES_FINDERS and STATICFILES_DIRS
that would look a lot like template loaders
# possible override of settings.FILE_CHARSET
},
}
}}}
This was discussed on django-developers: https://groups.google.com/d/msg
/django-developers/gEbFApLLuzg/IW1LDUwmEgAJ
There were some concerns about introducing another large dict in settings.
The general ideas was uncontroversial.
--
Ticket URL: <https://code.djangoproject.com/ticket/26029>
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.90e3a0df3c938281f539f58c29055172%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.