Hi,
I am having problems with POST. I am aware of this newbie mistake
http://code.djangoproject.com/wiki/NewbieMistakes#POSTtoviewslosesPOSTdata
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 [email protected]
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
-~----------~----~----~----~------~----~------~--~---