1. request and response objects
See https://docs.djangoproject.com/en/1.2/ref/request-response/
Django book
Learning notes will be learned. Today's focus is on redirect (HttpResponseRedirect)
Ii. Jump function:
It can be implemented in the background and in the foreground.
1. Background:
ClassHttpResponseRedirect:
Remember to import this module before using it,HttpResponseRedirectThe constructor accepts a parameter, which can be a complete url or an absolute path.
1 return HttpResponseRedirect ("http://www.yahoo.com/search/") 2 ------------------- or -------------------- 3 return HttpResponseRedirect ("/queryNews /")
Note,If the absolute path is missing and the front backslash is used, for example, return HttpResponseRedirect ("queryNews"), the queryNews path under this path is redirected.
For example: http: // 127.0.0.1: 8000/add_English/queryNews
2. Front-end:
Read: http://www.cnblogs.com/aszx0413/articles/1886819.html