def get_condition_result(condition, request=None):
template = Template(CONDITION_TEMPLATE.format(condition))
# Always assume that the end-user is dumb
with transaction.atomic():
try:
return template.render(context=RequestContext(request=request))
finally:
transaction.set_rollback(rollback=True)
评论列表
文章目录