Opened 9 years ago
Closed 9 years ago
#27598 closed New feature (fixed)
Allow specifying directories for a filesystem template loader
| Reported by: | Tim Graham | Owned by: | nobody |
|---|---|---|---|
| Component: | Template system | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
For template widget rendering (#15667), it'll be useful to allow specifying the directories for a particular instance of the filesystem template loader. Carl says:
The current implementation of the filesystem loader (looking at
self.engine.dirs) evolved naturally from its origins looking directly atsettings.TEMPLATE_DIRS, but a more flexible implementation would just takedirsas an extra loader parameter (we have precedent for loaders that take additional args: the cached loader). That allows inserting potentially two instances of the filesystem loader into the loaders chain, looking at two different lists of dirs, without needing a subclass.
PR