Skip to content

Commit

Permalink
Merge pull request #1 from SameeranB/SameeranB-patch-1
Browse files Browse the repository at this point in the history
Update views.py
  • Loading branch information
SameeranB authored Oct 16, 2019
2 parents 7f1f9f1 + 74544fd commit e8f010e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Main/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,11 @@ def signUp_view(request):


def login_view(request):
return HttpResponse(405)
username = request.data.get('username')
password = request.data.get('password')
user = authenticate(username, password)
if user.is_valid():
user.login()
return HttpResponse(201)
else:
return HttpResponse(405)

0 comments on commit e8f010e

Please sign in to comment.