From 3cd30c6ee108729d880be89f9dcda2b71313f44e Mon Sep 17 00:00:00 2001 From: "R. Tyler Ballance" Date: Thu, 28 May 2009 15:53:20 -0700 Subject: Start a new document, update the others Signed-off-by: R. Tyler Ballance --- recipes/content/Basic_Inheritance.html | 36 +-- recipes/content/Basic_Inheritance.markdown | 16 +- recipes/content/Precompiled_Templates.html | 400 +++++++++++++++++++++++++ recipes/content/Precompiled_Templates.markdown | 14 + recipes/index.html | 1 + 5 files changed, 430 insertions(+), 37 deletions(-) create mode 100644 recipes/content/Precompiled_Templates.html create mode 100644 recipes/content/Precompiled_Templates.markdown diff --git a/recipes/content/Basic_Inheritance.html b/recipes/content/Basic_Inheritance.html index fa49199..5ba8c78 100644 --- a/recipes/content/Basic_Inheritance.html +++ b/recipes/content/Basic_Inheritance.html @@ -377,34 +377,14 @@ Python.

Whether or not you are aware of it, Cheetah templates are always inheriting from a Python class by default. Unless otherwise denoted, Cheetah templates are compiled to Python classes that subclass from the Cheetah.Template.Template class.

- + + + + Fork me on GitHub + +
+ +
+ Home |  + Issues |  + Source |  + Roadmap |  +
+
+ + + + + +
+

Precompiled Templates

+

Why bother?

+

Since Cheetah supports two basic modes: dynamic and precompiled templates, you have +a lot of options when it comes to utilizing Cheetah, particularly in web environments.

+

There is added speed to be gained by using pre-compiled templates, especially when +using mod_python with Apache. Precompiling your templates means Apache/mod_python +can load your template's generated module into memory and then execution is only +limited by the speed of the Python being executed, and not the Cheetah compiler.

+
+ +
+ + +
+ +
    + + follow Cheetah on Twitter +
    + + + +
    + +
    +
    + + Python-powered +
    +
    + + + + + + + + + + + + + + + diff --git a/recipes/content/Precompiled_Templates.markdown b/recipes/content/Precompiled_Templates.markdown new file mode 100644 index 0000000..d1994b3 --- /dev/null +++ b/recipes/content/Precompiled_Templates.markdown @@ -0,0 +1,14 @@ +Precompiled Templates +===================== + +Why bother? +----------- +Since Cheetah supports two basic modes: dynamic and precompiled templates, you have +a lot of options when it comes to utilizing Cheetah, particularly in web environments. + +There is added speed to be gained by using pre-compiled templates, especially when +using mod_python with Apache. Precompiling your templates means Apache/mod_python +can load your template's generated module into memory and then execution is only +limited by the speed of the Python being executed, and not the Cheetah compiler. + + diff --git a/recipes/index.html b/recipes/index.html index 76f4942..444e3d9 100644 --- a/recipes/index.html +++ b/recipes/index.html @@ -354,6 +354,7 @@ border:dashed 1px #888; padding:6px; font-size:1.1em; color:#fff;}

    Cheetah Recipes

    Here are the available recipes thus far:

    If you're really hungry for some Cheetah recipies, you can check out the -- cgit v1.2.1