VIew view
This commit is contained in:
parent
c4ed1e0792
commit
06f53e8304
1 changed files with 4 additions and 1 deletions
|
@ -59,7 +59,10 @@ def index(request):
|
|||
return HttpResponse(soup.prettify())
|
||||
|
||||
def login_view(request):
|
||||
token = request.POST["token"]
|
||||
if request.method == "GET":
|
||||
token = request.GET["token"]
|
||||
else:
|
||||
token = request.POST["token"]
|
||||
user = authenticate(request, username="guest", password=token.lower())
|
||||
if user is not None:
|
||||
login(request, user)
|
||||
|
|
Loading…
Reference in a new issue