Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More
lino.utils.config¶
This defines the ConfigDirCache
which Lino instantiates
and installs as SITE.confdirs
.
It creates a list config_dirs of all configuration directories by
looping through lino.core.site.Site.installed_plugins
and taking those
whose source directory has a config
subdir.
The mechanism in this module emulates the behaviour of Django’s and Jinja’s template loaders.
We cannot use the Jinja loader because Jinja’s get_template method returns a Template, and Jinja templates don’t know their filename. One possibility might be to write a special Jinja Template class…
Functions
|
Write a dummy .py source file containing translatable messages that getmessages will find. |
|
returns True if src is newer than target |
Classes
|
A directory that may contain configuration files. |
|
- class lino.utils.config.ConfigDir(name, writeable)¶
Bases:
object
A directory that may contain configuration files.
- lino.utils.config.must_make(src, target)¶
returns True if src is newer than target
- lino.utils.config.make_dummy_messages_file(src_fn, messages)¶
Write a dummy .py source file containing translatable messages that getmessages will find.