这里使用的是django1.5
需求: 有一个界面A,其中有一个form B, 前台提交B之后,后台保存数据之后,返回界面A,如果保存失败需要在A界面提示错误。
这里就需要后台的重定向,而且需要可以带着参数,也就是error message
这里收集了几种方法,简答说下需要那些包,怎么简单使用。
一、 使用HttpResponseRedirect
The first argument to the constructor is required – the path to redirect to. This can be a fully qualified URL (e.g.’http://w