ABOUT
Danny Man
I’m Danny, and let me give you a warm welcome to visit my blog site. I hope you’ll enjoy it. Also, you can visit my HOME PAGE to learn more about me.
SEARCH
Django的Context和RequestContext
t = Template('My name is {{ name }}.')
c = Context({'name': 'Stephane'})
t.render(c)Django的模板渲染中,Context可以用来传递数据,一个Context是一系列变量和值的集合,它和Python的字典有点相似。context在Django里表现为Context类,在django.template...