Well 'methon' should be 'method', probably does not bother the browser though, but redirection is something that is issued by your app, not the form.
You should check: https://docs.djangoproject.com/en/1.5/topics/http/shortcuts/#redirect On Jul 6, 2013, at 9:29 AM, Kakar Arunachal Service <[email protected]> wrote: > Hello! Thanks for the correction! But even after the {% csrf_token %} tag its > not redirecting to the main index page. :( > > > On Sat, Jul 6, 2013 at 6:45 PM, Tomas Ehrlich <[email protected]> wrote: > Hi there, > you're certaily missing {% csfr_token %} in your form. > > If it doesn't solve the problem, you need to provide more info and be more > specific about your "trouble". > > Dne Sat, 6 Jul 2013 17:44:04 +0530 > Kakar Arunachal Service <[email protected]> napsal(a): > > > Hi, > > I am having trouble with redirecting the login page to index page. Please > > guide me. > > > > Here's the html snippet: > > <body> > > <h1>User Login</h1> > > {% if form.errors %} > > <p>Your username and password didn't match. > > Please try again.</p> > > {% endif %} > > <form methon="post" action="."> > > <p><label for = "id_username">Username:</label>{{ form.username > > }}</p> > > <p><label for = "id_password">Password:</label>{{ form.password > > }}</p> > > <input type="hidden" name="next" value="/" /> > > <input type="submit" value="login" /> > > </form> > > </body> > > > > Thanks. > > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/django-users. > For more options, visit https://groups.google.com/groups/opt_out. > > > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/django-users. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-users. For more options, visit https://groups.google.com/groups/opt_out.

