I forgot to post the problem. After clicking the 'Login' button,
Httprequest is submitted with method GET instead of POST. When I tried
to view the local variables, I am getting the form variables in GET
data and I am getting POST data as No data.

Sorry for the trouble.

Thanks,
Priyank

On Jun 21, 3:41 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> I am having problems with POST. I am aware of this newbie 
> mistakehttp://code.djangoproject.com/wiki/NewbieMistakes#POSTtoviewslosesPOS...
>
> Could someone help me out.
>
> --------------------------------------------------------------------------
> My view is
>
> lass  LoginForm( forms.Form):
>         loginName = forms.CharField()
>         password = forms.CharField(widget=forms.PasswordInput)
>
> def base_page(request):
>         if request.method == 'POST':
>                 render_to_response('logged_in.html', locals())
>         else:
>             loginForm = LoginForm()
>             return render_to_response('login.html', locals())
>
> -----------------------------------------------------------------------------
> My urls.py is
>
>      (r'^login/$', base_page),
>
> --------------------------------------------------------------------------------
> login.html
>
>    <form method="post" action=".">
>         <table>
>                 {{loginForm.as_table}}
>         </table>
>         <input type="submit" value="Login">
>    </form>
>
> I am not sure where I am doing the mistake. Everything looks right for
> me. Could some one help me out of this.
>
> Thanks,
> Priyank
--~--~---------~--~----~------------~-------~--~----~
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