Yeah.. That is one bug. But that is not the reason. Because, execution is not going inside the if condition.
request.method is GET instead of POST. So anything inside the if condition shouldn't matter. Any other bugs? I am so much tired of this mysterious looking bug Thanks, Priyank. On Jun 21, 4:06 pm, Jeff FW <[EMAIL PROTECTED]> wrote: > Looks like you forgot a return statement in the if statement. Not > sure if that would cause what you're seeing, but it certainly couldn't > help. > > -Jeff > > On Jun 21, 6:46 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > > 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 [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 -~----------~----~----~----~------~----~------~--~---

