[Checkins] SVN: grokcore.view/branches/shared_templates_userwarning/src/grokcore/view/interfaces.py Sketch out the public interface of the templatereg module.
Martijn Faassen
faassen at startifact.com
Sat Jul 4 12:40:17 EDT 2009
Log message for revision 101552:
Sketch out the public interface of the templatereg module.
lookup still needs to be implemented properly.
Changed:
U grokcore.view/branches/shared_templates_userwarning/src/grokcore/view/interfaces.py
-=-
Modified: grokcore.view/branches/shared_templates_userwarning/src/grokcore/view/interfaces.py
===================================================================
--- grokcore.view/branches/shared_templates_userwarning/src/grokcore/view/interfaces.py 2009-07-04 16:38:43 UTC (rev 101551)
+++ grokcore.view/branches/shared_templates_userwarning/src/grokcore/view/interfaces.py 2009-07-04 16:40:17 UTC (rev 101552)
@@ -165,3 +165,27 @@
class TemplateLookupError(Exception):
pass
+
+class ITemplateRegAPI(Interface):
+ """Public API for the templatereg module.
+ """
+ def register_inline_template(module_info, template_name, template):
+ """Register an inline template with the template registry.
+
+ module_info - the module_info of the module the inline template is in
+ template_name - the name of the template
+ template - the template itself
+ """
+
+ def register_directory(module_info):
+ """Register a template directory for a module.
+
+ module_info - the module_info of the module
+ """
+
+ def lookup(module_info, template_name):
+ """Look up a template for a module.
+
+ module_info - the module info for which to look up the template
+ template_name - the name of the template to look up.
+ """
More information about the Checkins
mailing list