Django教程:[13]如何使用模板系统:
Python 2.7.5 (default, Mar 9 2014, 22:15:05)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from django.conf import settings
>>> settings.configure()
>>> from django import template
>>> tem=template.Template('My telnum is {{num}}.')
>>> con=template.Context({'num':'2131234'})
>>> t=tem.render(con)
>>> print t
My telnum is 2131234.
>>>