Re: method="POST" form problems. Help required
Nested forms are allowed in XHTML5[1]. Since there isn’t a browser that does it yet, you’ll have to wait. On Jun 21, 2008, at 5:36 PM, [EMAIL PROTECTED] wrote: > Atlast, I found the bug, login.html inherits from base page. So, the > form mentioned in the above code is nested inside a GET form. > > Now I get one doubt. Can't we nest the forms? Does nesting of forms > make sense in any context? [1]: http://www.whatwg.org/specs/web-forms/current-work/#changes -- Peter of the Norse --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: method="POST" form problems. Help required
That clears everything. Thanks a lot. -Priyank On Jun 21, 4:46 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Sat, Jun 21, 2008 at 7:36 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> > wrote: > > > > > Atlast, I found the bug, login.html inherits from base page. So, the > > form mentioned in the above code is nested inside a GET form. > > > Now I get one doubt. Can't we nest the forms? Does nesting of forms > > make sense in any context? > > No, forms cannot be nested. > Fromhttp://www.w3.org/TR/html401/interact/forms.html:"A form can contain text > and markup (paragraphs, lists, etc.) in addition to form controls." No > mention of other forms. Fromhttp://www.w3.org/MarkUp/html3/forms.html: > "Note you are not allowed to nest FORM elements!" > > Karen --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: method="POST" form problems. Help required
On Sat, Jun 21, 2008 at 7:36 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Atlast, I found the bug, login.html inherits from base page. So, the > form mentioned in the above code is nested inside a GET form. > > Now I get one doubt. Can't we nest the forms? Does nesting of forms > make sense in any context? > No, forms cannot be nested. From http://www.w3.org/TR/html401/interact/forms.html: "A form can contain text and markup (paragraphs, lists, etc.) in addition to form controls." No mention of other forms. From http://www.w3.org/MarkUp/html3/forms.html: "Note you are not allowed to nest FORM elements!" Karen --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: method="POST" form problems. Help required
Atlast, I found the bug, login.html inherits from base page. So, the form mentioned in the above code is nested inside a GET form. Now I get one doubt. Can't we nest the forms? Does nesting of forms make sense in any context? On Jun 21, 4:12 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > 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 > > > > > > > > > > > > > {{loginForm.as_table}} > > > > > > > > > > > > > > > > > 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 -~--~~~~--~~--~--~---
Re: method="POST" form problems. Help required
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 > > > > > > > > > > {{loginForm.as_table}} > > > > > > > > > > > > > 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 -~--~~~~--~~--~--~---
Re: method="POST" form problems. Help required
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 > > > > > > > {{loginForm.as_table}} > > > > > > > > > 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 -~--~~~~--~~--~--~---
Re: method="POST" form problems. Help required
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 > > > > {{loginForm.as_table}} > > > > > 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 -~--~~~~--~~--~--~---
method="POST" form problems. Help required
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 {{loginForm.as_table}} 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 -~--~~~~--~~--~--~---