Template.TemplateLocator¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent_instance |
r |
Class Details¶
- class Template.TemplateLocator(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The #TmplTemplateLoader class is used to specify how templates should be loaded. This can be used directly by your code that will compile the data streams into
Template.Templateinstances, or by aTemplate.Templatethat is resolving includes from the{{include "path.tmpl"}}directive.See
Template.Template:locatorfor more information.- classmethod new()¶
- Return type:
- get_search_path()¶
-
Gets the current search path used by the template locator.
- locate(path)¶
- Parameters:
path (
str) – a relative path to the file- Raises:
- Returns:
A
Gio.InputStreamorNoneand error is set.- Return type:
This will resolve the relative path using the search paths found within the template loader.
- do_locate(path) virtual¶
- Parameters:
path (
str) – a relative path to the file- Returns:
A
Gio.InputStreamorNoneand error is set.- Return type:
This will resolve the relative path using the search paths found within the template loader.