btw this requires that you use render_to_response with the 3rd argument, context_instance=RequestContext(request)
see docs. http://docs.djangoproject.com/en/dev/ref/templates/api/?from=olddocs session docs http://docs.djangoproject.com/en/dev/topics/http/sessions/#topics-http-sessions On Nov 23, 9:51 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I just solved this issue. I did by using using sessions. > > I initialize this in a couple of views. > > request.session['last'] = request.get_full_path() > > If a user tries to do something restricted it requires them to login > which I do the same exact way you do. > > After they login they get redirected to what is specified in next.. > fill out a form, yada yada yada. > after success of that I then do this. > > return HttpResponseRedirect(request.session['last']) > > hope this helps. > > On Nov 5, 11:08 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > > That is the problem I am trying to solve. > > > Basically, the restricted area isn't static. A user could be viewing > > any number of dynamic pages protected by a sign in page. > > > If it were simply a static page, it would be trivial to do: return > > HttpResponseRedirect("/static_page/") > > > The ?next= argument is only used by django's automatic sign-in code. > > I'm not even sure how I could use it myself. Do you have any ideas > > what I should try? > > > Basically: > > > 1) every potential page that has its access restricted must be able to > > pass the current path along to the login page > > 2) The login page needs to send along the same path to the > > create_account page if it is clicked. If it is not clicked, then we > > will return to the current page and no extra code is needed. > > 3) The create account page can now return > > HttpResponseRedirect(previousPath) > > > What is the best way to do this? --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---