Dear All,

today I try to make login page with follow example code in
djangoproject (user authentication chapter), code as following below :

def my_view(request):
   username = request.POST['username']
   password = request.POST['password']
   user =  authenticate(username=username, password=password)#create
Authentication object

   if user is not None:
      if user.is_active:
         login(request,user)
         return HttpResponse('login success')
      else:
         return HttpResponse('disable account')
   else:
      return HttpResponse('invalid login')

the above code always shows MultiValueDictKeyError with exception
value "Key 'username' not found in <QueryDict: {}>".
please give me clue to resolve this problem. Thank you in advance

regards,
-vierda-
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to