自django1.3开始:render()方法是render_to_response的一个崭新的快捷方式,
前者会自动使用
RequestContext。而后者必须coding
出来,这是最明显的区别,当然前者更简洁。 return render_to_response('blog_add.html',{'blog': blog, 'form': form, 'id': id, 'tag': tag}, context_instance=RequestContext(request)) return render(request, 'blog_add.html', {'blog': blog, 'form': form, 'id': id, 'tag': tag})

相关文章:

  • 2021-09-13
  • 2022-12-23
  • 2021-07-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-28
  • 2022-12-23
猜你喜欢
  • 2021-07-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案