On Tue, 2007-10-30 at 17:01 -0700, crybaby wrote: > I have added @login_required decorator in one of my view functions. > When I request page that has login decorator, I get routed to this > url: > http://127.0.0.1:8000/login/?next=/post/create/ > > After I login, it goes to this url: > http://127.0.0.1:8000/accounts/profile/ > > What I want it to do is, send the user back to page they were on, > before login page. It doesn't even do this: > ?next=/post/create/
What you are doing looks correct. The "/post/create/" string should be extracted in django.contrib.auth.views.login as the "redirect_to" variable (line 15). Have a look at the value of that variable to see what it is being set to. Regards, Malcolm -- A clear conscience is usually the sign of a bad memory. http://www.pointy-stick.com/blog/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" 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/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

