root/galaxy-central/eggs/Cheetah-2.2.2-py2.6-macosx-10.6-universal-ucs2.egg/Cheetah/Django.py @ 3

リビジョン 3, 0.6 KB (コミッタ: kohda, 14 年 前)

Install Unix tools  http://hannonlab.cshl.edu/galaxy_unix_tools/galaxy.html

行番号 
1import Cheetah.Template
2
3def render(template_file, **kwargs):
4    '''
5        Cheetah.Django.render() takes the template filename
6        (the filename should be a file in your Django
7        TEMPLATE_DIRS)
8
9        Any additional keyword arguments are passed into the
10        template are propogated into the template's searchList
11    '''
12    import django.http
13    import django.template.loader
14    source, loader = django.template.loader.find_template_source(template_file)
15    t = Cheetah.Template.Template(source, searchList=[kwargs])
16    return django.http.HttpResponse(t.__str__())
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。