Hi guys,

I am new to Django, but I really like what I saw so far. Cool stuff.

I am running 0.91 and having trouble with POST request. If I change the
method from POST to GET the things works, so I was wondering what's
going on.

Template:

<form action="/accounts/signIn" method="POST">
    <input type="text" name="userName"/>
    <input type="password" name="password"/>
    <input type="submit" value="Sign in"/>
</form>

View:

def signIn(request):
    try:
        user = users.get_object(username__exact=request['userName'])
        ...
    except users.UserDoesNotExist:
        ...

Problem:

    KeyError at /accounts/signIn/
    'userName not found in either POST or GET
    ...
    GET     No GET data
    POST   No POST data

As I said, if I change POST to GET, the thing works suddenly.
Any ideas?

Many thanks,
Vladimir


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to