Opened 8 years ago

Closed 8 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 at settings.TEMPLATE_DIRS, but a more flexible implementation would just take dirs as 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.

Change History (2)

comment:1 by Tim Graham, 8 years ago

Has patch: set

comment:2 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: assignedclosed

In 92c5eeac:

Fixed #27598 -- Allowed specifying directories for a filesystem template loader.

Thanks Carl Meyer for review.

Note: See TracTickets for help on using tickets.
Back to Top