mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-12 06:07:56 +00:00
Update env renderer on config change
We have a side effect whenever we add a plugin manually to the tutor configuration: the renderer does not update itself. We fix this by checking the config at load time.
This commit is contained in:
parent
50f5af989c
commit
7fbba104a1
@ -17,10 +17,12 @@ VERSION_FILENAME = "version"
|
||||
|
||||
class Renderer:
|
||||
ENVIRONMENT = None
|
||||
ENVIRONMENT_CONFIG = None
|
||||
|
||||
@classmethod
|
||||
def environment(cls, config):
|
||||
if not cls.ENVIRONMENT:
|
||||
if cls.ENVIRONMENT_CONFIG != config:
|
||||
cls.ENVIRONMENT_CONFIG = config
|
||||
template_roots = [TEMPLATES_ROOT]
|
||||
for _, plugin_templates in plugins.iter_templates(config):
|
||||
template_roots.append(plugin_templates)
|
||||
|
Loading…
Reference in New Issue
Block a user