资 源 简 介
Cheetah template engine for Django
Usage
Use the render_cheetah_response shortcut just as you would use render_to_response
Use the CheetahTemplate class to render contexts in your views from text or file
News - Now released a version which is the stand alone module django\_cheetahtemplates and contains the application of the example below. See the source svn repository for the most up to date code.
## Example ##
Put this in your views
```
from djangocheetahtemplates import rendercheetah_response,CheetahTemplate
from django.template import Context
from django.http import HttpResponse
def hello(request):
# Use shortcut
return rendercheetahresponse("hello.tmpl", {"myvar":"hello world","range":range} )
def hello2(request):
# Create and render context
context = Context({"myvar":"hello"})
context["range"]