from django.conf import settings
from django import template
settings.configure()
a = template.Template('My name is {{ name }}.')
b = template.Context({"name":"xiaol"})
print a.render(b)
from django.conf import settings
from django import template
settings.configure()
a = template.Template('My name is {{ name }}.')
b = template.Context({"name":"xiaol"})
print a.render(b)
转载于:https://www.cnblogs.com/413xiaol/p/6854396.html