Deprecate is_usable attribute on template loaders?
Each Django loaders has a boolean attribute of "is_usable". It seems the only use for this comes from the egg loader when setuptools isn't installed. If "is_usable" is false, a warning is raised in engine.find_template_loader, but otherwise the loader is silently ignored for template loading.
It seems like that is the wrong behavior. I think the loaders should fail loudly if they're missing configuration. Otherwise, it's unclear why they're not used to find templates. I ran into this when writing a sample loader and forgetting to specify "is_usable" as True on it.
Unless there's a use case for silently ignoring template loaders, I think we should deprecate this behavior.
Change History
(5)
Triage Stage: |
Unreviewed → Accepted
|
Type: |
Uncategorized → Cleanup/optimization
|
Resolution: |
→ fixed
|
Status: |
new → closed
|
Yes.