django模板template

版权声明:17602128911 https://blog.csdn.net/bus_lupe/article/details/89261519
>>> python manage.py shell (进入该django项目的环境)
>>> from django.template import Context, Template
>>> t = Template('My name is {{ name }}.')
>>> c = Context({'name': 'Stephane'})
>>> t.render(c)
'My name is Stephane.'

猜你喜欢

转载自blog.csdn.net/bus_lupe/article/details/89261519