Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6778299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:15:01+00:00 2026-05-26T16:15:01+00:00

I am reading a djangobook and get questions about HttpResponseRedirect and render_to_response . suppose

  • 0

I am reading a djangobook and get questions about HttpResponseRedirect and render_to_response.

suppose I have a contact form, which posts data to confirm view. It goes through all the validation and database stuff. Then, as a usual way, I output the html with

return render_to_response('thank_you.html',
                          dict(user_code = user_code),
                          context_instance=RequestContext(request))

However, the book suggested “You should always issue a redirect for successful POST requests.” because if the user “Refresh” on a this page, the request will be repeated. I wonder what’s the best way to send the user_code along through HttpResponseRedirect to the thank_you.html.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T16:15:02+00:00Added an answer on May 26, 2026 at 4:15 pm

    Pass the information in a query string:

    thank_you/?user_code=1234
    

    Or use a session variable.

    The problem with a query string is that the user can see the data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

while reading up djangobook chapter ,I came across the section which mentions a csrf
Reading some questions here on SO about conversion operators and constructors got me thinking
Reading some related questions made me think about the theoretical nature of HTML. I'm
Reading the answers to previous questions regarding SharePoint alerts, I have found many interesting
Reading across difference lineage of CPU created by intel , many questions aroused in
Reading manual about Sling http://sling.apache.org/site/46-line-blog.html added folder blog and blog.html to destination: \launchpad\content\src\main\resources\content\ but
Reading through this excellent article about safe construction techniques by Brain Goetz, I got
Reading about the Dispose pattern , I see the documentation repeatedly refer to cleaning
Reading code from other posts, I'm seeing something like this. struct Foo { Foo()
Reading through the CKEditor documentation , I see that they have an option to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.