On 16 Sep 2006, at 13:39, Malcolm Tredinnick wrote:
Most of the time... sometimes of course it is empty. I have tried passing the url to redirect to explicitly and HttpResponseRedirect still errors.. If I hard code a url in... it works... but I have used a template to render out the referer and it's fine...
No
OK. excuse my poor code... but here's my method that (actually passes the url urlencoded and ) tries to alter a session variable which contains a list of sites to ignore... this method deletes one of them from that list.... from django.http import HttpResponseRedirect, HttpResponse def reinstate_site(request, site, url): try: notsitelist = request.session['notsitelist'] except: notsitelist = [ ] # if doesn't exist yet... i = 0 for notsite in notsitelist: if site == notsite: del notsitelist[i] i+=1 request.session['notsitelist'] = notsitelist return HttpResponseRedirect(url) I have also tried using request.META[HTTP_REFERER'] with this approach and get the same --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~--- |
- Database query question Tom Smith
- Re: Database query question Malcolm Tredinnick
- Redirecting in Django... Tom Smith
- Re: Redirecting in Django... Malcolm Tredinnick
- Re: Redirecting in Django... Tom Smith
- Re: Database query question Tom Smith
- Re: Re: Database query question Russell Keith-Magee
- Re: Database query question Tom Smith
- Re: Database query question Michael Radziej
- Re: Database query question Tom Smith
- Re: Re: Database query q... James Bennett
- Re: Re: Database query question James Bennett
- Re: Database query question Tom Smith