Def login (request) :
. If the request method=="GET" :
Return render (request, "login. HTML")
The else:
Print (request. POST)
U=request. POST. Get (" user ")
P=request. POST. Get [" PWD "]
If u==(" root ") and p==(" 123 ") :
# login success
Return an HttpResponse (" login succeeds ")
The else:
Return render (request, "login. HTML")
Return render (request, "login. HTML")
login. HTML content:
<meta charset="utf-8" & gt;
<body>
Immediately registered & lt;/a>
{{calresult}} & lt;/p>