Olaf Stein
steino at ccri.net
Thu Apr 5 10:04:49 EDT 2007
I could call login from within start... Thanks What do you mean by redirect? On 4/5/07 9:53 AM, "Sean Davis" <sdavis2 at mail.nih.gov> wrote: > On Thursday 05 April 2007 09:37, Olaf Stein wrote: >> Hi all, >> >> I have a small app that works like this >> >> Somebody visits the start page >> >> http://localhost/apps/start/enter >> >> where start is a python file (start.py) and enter() the function that >> displays the login html (through templates, etc) >> >> After entering credentials and clicking the login button, I call a function >> login() (also in start.py), which checks the credentials and then call >> either the function enter() again (if credentials are not good) or function >> start() (if credentials are good). Basically function login() does not >> create any html output. >> >> The question now is, after logging in and calling start(), the function >> executes correctly, but in the browser's address bar it still shows >> >> http://localhost/apps/start/login >> >> Instead of >> >> http://localhost/apps/start/start >> >> Is this because login() does not create html output and is there anything I >> can do so the "correct" path is shown > > You can have login() do a redirect to start() if successful. Or (probably > more efficient) call start(), check login() from within start(), and in > login, do a redirect to enter() if the login criteria are not met. > > But I might be misunderstanding something here. > > Sean ------------------------- Olaf Stein DBA Center for Quantitative and Computational Biology Columbus Children's Research Institute 700 Children's Drive phone: 1-614-355-5685 cell: 1-614-843-0432 email: steino at ccri.net
|