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