Hi Doug, Yes, I'm absolutely certain it's not a browser caching issue. I was concerned that there was something syntactically wrong with my session get/set code that would cause the value not to be stored.
Thoughts? Thanks, Brandon On Apr 29, 10:21 am, Doug Van Horn <[EMAIL PROTECTED]> wrote: > You may want to make sure your browser cache isn't showing you an old > page. Hit F5 a few times, and also make sure your browser settings > have the cache at 0MB, so it doesn't cache anything. > > After that I'd start by adding some print statements after you add the > variable to the session and right before you push the variable into > the template, to see if it's making it through the redirect. > > If it is, then the issue is with your template, if it's not then the > issue is with the session. > > Doug Van Hornhttp://maydigital.com/ > > On Apr 29, 12:04 am, Brandon Taylor <[EMAIL PROTECTED]> wrote: > > > Hello everyone, > > > I'm doing a redirect after a form to a "thank you" page, which I would > > like to personalize with some of the data from the form. I've tried > > setting a session as such: > > > ### views.py code > > > if form.is_valid(): > > first_name = form.cleaned_data['first_name'] > > request.session['first_name'] = first_name > > > return HttpResponseRedirect('training/thanks/') > > > But, when I try to output the value in the "thanks" template, as such: > > > def thanks(request): > > first_name = request.session.get('first_name') > > return render_to_response('thanks.html', 'first_name' : > > first_name) > > > I get nothing. I've checked to make sure that the sessions middleware, > > and the sessions app are included in my settings.py file. What am I > > doing wrong? Help appreciated! > > > Brandon --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---