THANKYOU

On 4/29/08, 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to