1、修改views.py信息
from __future__ import unicode_literals
from django.shortcuts import render
from django.http.response import HttpResponse
from django.shortcuts import render_to_response
# Create your views here.
def Login(request):
if request.method == 'GET':
username = request.GET.get('username')
return HttpResponse(username)
else:
return render_to_response('login.html')
2、啟動(dòng)服務(wù)器,并打開瀏覽器訪問(wèn)
# python manage.py runserver 8001

訪問(wèn)結(jié)果.png
3、在瀏覽器中輸入信息
在瀏覽器地址中加入?username=xxx,點(diǎn)擊回車,頁(yè)面會(huì)顯示輸入的信息,但是使用此方法,一次只能訪問(wèn)一個(gè)參數(shù),需要用python序列化來(lái)訪問(wèn)多個(gè)參數(shù)的界面

image.png