On Sep 7, 3:52 am, "Ben Hoyt" <[EMAIL PROTECTED]> wrote:
> Does this mean this authentication example is using it incorrectly?
>
> >http://webpy.infogami.com/authentication
> > Relevent code:
> >         if inp.username == user.username and inp.password ==
> > user.password:
> >             dologin(user)
> >             web.redirect('/')
> >         else:
> >             web.render('login.html')
>
> Yeah, for redirect-after-POST I think it should be using web.seeother (HTTP
> 303) for that. From the
> spec<http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.4>:
> "This method exists primarily to allow the output of a POST-activated script
> to redirect the user agent to a selected resource."
>

Thanks, Ben.  Well then, I think this is the cause of the not
reloading after login problem you mentioned.   Well, I"m hoping at
least.  I'll try it out later.  And getting rid of my inappropriate
redirects is the right thing to do anyway :-)

Group, FYI Ben is having an issue on my site (utilitymill.com) where
after he logs in, the home page doesn't change/update to reflect the
fact that he's logged in until he does a refresh.  I'm suspecting it's
the redirect so far.

-Greg


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to