#36504: Docs: LazyObject for storages with override_settings does not behave as
described
-------------------------------------+-------------------------------------
Reporter: Brinky5678 | Type:
| Cleanup/optimization
Status: new | Component:
| Documentation
Version: 5.2 | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Dear Django Team,
While working on my own Django project using storages, I found an error in
the [Managing Files - Using a
callable](https://docs.djangoproject.com/en/5.2/topics/files/#using-a-callable)
documentation (the last two code blocks to be precise). As it turns out,
the solution of using the `override_settings` decorator does not work as
advertised while testing `FileField`s.
I have made a minimal Django project
(https://github.com/Brinky5678/django_incorrect_docs_demo) for easy
replication. In the readme, I have included steps to how to replicate, as
well as the cause of why I think it does not work as expected.
This ticket is not meant to provide a workable solution using the
`override_settings` decorator. Instead, I merely wish to have the
documentation updated in such a way that the warning of the storage
callables being evaluated during model loading remains, but without the
incorrect documentation about using `LazyObject`s.
--
Ticket URL: <https://code.djangoproject.com/ticket/36504>
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 visit
https://groups.google.com/d/msgid/django-updates/01070198046e1dbc-cc92bfc6-9a81-40e8-9227-c3652ff20910-000000%40eu-central-1.amazonses.com.