unfortunately, the redirect_field_name sets the "name" part of the get variable, like
instead of http://127.0.0.1:8000/accounts/login/?next=/my/view you get http://127.0.0.1:8000/accounts/login/?redirect_to=/my/view On Sep 27, 5:34 pm, "Сергей Зигачев" <root.sig...@googlemail.com> wrote: > Sorry, maybe you should use something like that: > > @login_required(redirect_field_name='redirect_to') > > Where `redirect_to' is the address for a specific page. > > -----Original Message----- > From: django-users@googlegroups.com [mailto:django-us...@googlegroups.com] > > On Behalf Of V > Sent: Sunday, September 27, 2009 9:21 PM > To: Django users > Subject: Re: login_required redirects to a specific url > > but that's a site wide setting, and I would like to have a different > url for a specific view only > > V > > On Sep 27, 3:41 pm, "Сергей Зигачев" <root.sig...@googlemail.com> > wrote: > > Hello, > > >http://docs.djangoproject.com/en/dev/ref/settings/#setting-LOGIN_URL > > > As you can see, you need to implement the LOGIN_URL value in your > > settings.py file. > > > From: django-users@googlegroups.com [mailto:django-us...@googlegroups.com] > > On Behalf Of }--o > > Sent: Sunday, September 27, 2009 7:18 PM > > To: django-users > > Subject: login_required redirects to a specific url > > > Hi, > > > I'm using the login_required decorator extensively, but have one view > where > > instead of the default landing page ('accounts/login') I would like to > > redirect it to a specific page. Is there a simple way to do this? > > > Viktor > > --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---