Ya me funciono.
Código PHP:
def validate(request):
username = request.POST.get('username', False)
users = user.objects.get(username=username)
if users.password == request.POST['password']:
request.session['member_id'] = users.id
return HttpResponseRedirect('/profile/view/' + users.username)
# return render(request, 'user/view_profile.html', {'user': users})
else:
return HttpResponseRedirect('/login/')