I don't think that's it, as the full login page I'm referring to isn't
the admin login, but my own login.html template based on the example
in the authentication docs:
http://www.djangoproject.com/documentation/authentication/#the-login-required-decorator

Logging in from that template works every time.


On Aug 31, 12:39 pm, Florian Apolloner <[EMAIL PROTECTED]> wrote:
> Yeah one idea:
>     <input type="hidden" name="this_is_the_login_form" value="1" />
>     <input type="hidden" name="post_data"
> value="KGRwMQouMzA3NzQ4ZmMxMWUxYWJjNjMwNDBlYmJiMmZmOWZlMGE=
> " />
> Is what the default admin login page contains, so maybe adding this
> will be enough, or you would need to write a custom view (I am a
> little bid concerned about the post_data as it seems to be some random
> string for security).
>
> Florian
>
> On Aug 31, 9:23 pm, jfagnani <[EMAIL PROTECTED]> wrote:
>
> > I'm trying to add a login widget to a site that will appear on every
> > page for an unauthenticated user, much like on slashdot. It seems
> > pretty straight forward, but I'm getting some really strange behavior
> > from django.contrib.auth.views.login
>
> > My widget consists of a form like this:
>
> > <form action="/login/" method="post">
> > Username:
> > <input type="text" name="username" size="18"/>
> > Password:
> > <input type="password" name="password" size="18"/>
> > <input type="hidden" name="next" value="/{{ request.path }}"/>
> > <input type="submit" value="login"/>
> > </form>
>
> > The first time a user logs in, the login fails, and the user is shown
> > the standard login page with the username and password filled in.
> > Clicking on login without changing the form values will successfully
> > log the user in. Also, clicking the back button and re-submitting will
> > log the user in.
>
> > I can't figure out what's going on, the form obviously works in some
> > circumstances, and the log-in data is also correct.
>
> > Any ideas?
>
> > Thanks,
> >   Justin


--~--~---------~--~----~------------~-------~--~----~
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