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 8096265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:24:00+00:00 2026-06-05T21:24:00+00:00

My app, Datastore, webapp2, and form-specific responses are all working :) but I need

  • 0

My app, Datastore, webapp2, and form-specific “responses” are all working 🙂 but I need the page to load without displaying previous visitor’s query results. I need query results only for current form-submitter, after they submit form. Is this a session or headers solution, or can I edit the GqlQuery to accomplish this?

messages = db.GqlQuery("SELECT * "
                                "FROM Visitor " 
                                "ORDER BY date DESC LIMIT 1") #obviously shows previous form submit
        for message in messages:
            if message.name == "" or message.mood == "":
                self.response.out.write("<div class='textright'>Type name and select.</div>")
                self.response.out.write("</body></html>")
            elif message.mood == "bad" and message.name != "":
                self.response.out.write("<body><html>")
                self.response.out.write("<div class='textright'>Stay the course  

^ ^ this last section is my “response” that needs to appear only after current visitor submits form.

  • 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-06-05T21:24:01+00:00Added an answer on June 5, 2026 at 9:24 pm

    I would strongly recommend you to go through the Getting Started and especially the templates section, until you will understand how it works.

    But you if you just want to see your example in action try this (read more):

    class Process(webapp.RequestHandler):
      def post(self):
        name = self.request.get("name")
        mood = self.request.get("mood")
    
        if mood == "bad" and name != "": 
          self.response.out.write("<html><body>")
          self.response.out.write("<h1>Welcome to the Internet!</h1>")
          self.response.out.write("<p>My mood is %s and my name is %s</p>" % (mood, name))
          self.response.out.write("</body></html>")
        else:
          self.response.out.write("<html><body>")
          self.response.out.write("<h1>Welcome to the Internet anyway!</h1>")
          self.response.out.write("</body></html>")
    

    Also never use print in your GAE applications, use the logger instead for debugging and more.

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

Sidebar

Related Questions

I'm working on a GAE app. I want to query datastore and retrieve all
I have created a datastore on the google app engine but would like to
I'm looking at writing a super-class for all my Google App Engine datastore classes
I am using the Goole app engine datastore with Java and trying to load
When I try to access the Datastore Admin page in my GAE app, i
Someone must know of a working eclipse project for GWT / App Engine datastore
From the GAE getting started guide Because the App Engine datastore is not a
Since there is no way to join tables using Google App Engine datastore, I
I have an Expando model kind in my App Engine datastore and I'm setting
I'm trying to test the efficiency of the Google App Engine Datastore database. I

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.