Django教程

来源:互联网 发布:手机淘宝5.6.0 编辑:程序博客网 时间:2024/05/21 15:54
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 darwinType "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 tMy telnum is 2131234.>>> 


0 0
原创粉丝点击