【发布时间】:2012-01-23 21:30:41
【问题描述】:
它被认为是正确的/将部分模板返回给 ajax POST 请求是否有任何陷阱?
例如:
if request.is_ajax:
# response is just the form
return render(request, 'contact/fields.html', {'form':form})
【问题讨论】:
-
部分是指它只是一些 HTML 吗?没有 doctype 或 标签?
-
是的,没错。像一堆 html
标签: django django-templates django-views