1. HttpResponse?:? 它的作用是內部傳入一個字符串參數, 然后發給瀏覽器
def index(request):return HttpResponse('ok')
2. render?:? 可以接收三個參數, 一是request參數, 二是待渲染的 html 模板文件, 三是保存具體數據的字典參數
def index(request):return render(request, 'index.html', {'name':'prince', 'hobby':['rending','listening']}
3. redirect :? 接收一個URL參數, 表示讓瀏覽器跳轉去指定的URL
def index(request):return redirect('http://www.baidu.com')
?