Re: redirect after login

2010-12-07 Thread andy
Did you get the next parameter in the login template and append it to form action, If that is not done then once the form is submitted the next param would be lost. On Dec 7, 5:45 am, vamsy krishna wrote: > request.GET returns an empty dict > > On Dec 7, 3:35 pm, Kenneth Gonsalves wrote: > > > O

Re: redirect after login

2010-12-07 Thread vamsy krishna
request.GET returns an empty dict On Dec 7, 3:35 pm, Kenneth Gonsalves wrote: > On Tue, 2010-12-07 at 02:31 -0800, vamsy krishna wrote: > > redirect_to = request.REQUEST.get('next') > > how about > redirect_to = request.GET? > -- > regards > Kenneth Gonsalves -- You received this message becaus

Re: redirect after login

2010-12-07 Thread Kenneth Gonsalves
On Tue, 2010-12-07 at 02:31 -0800, vamsy krishna wrote: > redirect_to = request.REQUEST.get('next') how about redirect_to = request.GET? -- regards Kenneth Gonsalves -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

redirect after login

2010-12-07 Thread vamsy krishna
Hi, I have the below line in my login code which decides the redirect screen on successful login redirect_to = request.REQUEST.get('next') However redirect_to is always evaluating to None even though the parameter 'next' is part of the url. Any idea what i might be doing wrong? Thanks in advanc

Re: Cannot redirect after login

2007-12-30 Thread [EMAIL PROTECTED]
Thanks, Michael, That solved the problem. YJ On Dec 28, 1:48 pm, Empty <[EMAIL PROTECTED]> wrote: > > Also, I don't understand what the last tag is for, either. Any > > help would be greatly appreciated. > > The last form tag is an error. It should be the closing form tag > > > > Fix that and

Re: Cannot redirect after login

2007-12-28 Thread Empty
> Also, I don't understand what the last tag is for, either. Any > help would be greatly appreciated. > The last form tag is an error. It should be the closing form tag Fix that and see if your problem persists. Michael Trier blog.michaeltrier.com --~--~-~--~~~---

Cannot redirect after login

2007-12-28 Thread [EMAIL PROTECTED]
Hello, I was following the chapter 12 of the django book and had a redirect problem after login. I cannot redirect to the page I want. I found the following trick from the Django user group, but it did not work for me. I was always taken to the /accounts/profile/ even with your code. Here is what

Re: Redirect after login problem

2007-09-30 Thread Paddy Joy
Thanks guys, I didn't fully understand the meaning of "redirect_field_name". @login_required() on it's own works as expected. Paddy On Sep 30, 3:19 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > On 9/29/07, Paddy Joy <[EMAIL PROTECTED]> wrote: > > > views.py > > @login_required(redirect_fiel

Re: Redirect after login problem

2007-09-29 Thread James Bennett
On 9/29/07, Paddy Joy <[EMAIL PROTECTED]> wrote: > views.py > @login_required(redirect_field_name='/login/') > def index(request) You're using the 'redirect_field_name' argument incorrectly. The default value is 'next', which means Django will expect something like this: http://yoursite.com/acc

Re: Redirect after login problem

2007-09-29 Thread Przemek Gawronski
Hi > I'm using the following code, anyone got any ideas what could be > wrong? > @login_required(redirect_field_name='/login/') My guess is, that it should be: @login_required(redirect_field_name='/hosting/login/') > urls.py > # Login > (r'^hosting/login/$', 'django.contrib.auth.views.login',

Redirect after login problem

2007-09-29 Thread Paddy Joy
I'm having some problems getting the "next" variable to work in the authentication module. After a user is logged in the page is redirected to /accounts/profile rather than being directed to the "next" variable. I'm using the following code, anyone got any ideas what could be wrong? views.py @l