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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:13:07+00:00 2026-06-08T08:13:07+00:00

I am running python in GAE and am stuck on a few questions related

  • 0

I am running python in GAE and am stuck on a few questions related to GQL queries and using templates.

When I load the homepage, it triggers this function:

class MainPage()
    def get(self):
            product_list = Post.gql("ORDER BY product LIMIT 10")
            self.render('index.html', product_list = product_list)

    def post(self):

            email = self.request.get('email')
            product = self.request.get('product')

            if email and product:
                p = Post(parent = blog_key(), email = email, product = product)
                p.put()

It should pass a list of the products to the homepage, as well as accept new entries through a form on the homepage.

index.html:

<form id="inputs" method="post">
   <input id="product" type="text" name="product" value="product?" value="{{product}}"></input>
   <input type="text" name="email" id="email" value="email?" value="{{email}}"></input>
   <button type="submit" value="submit!">Submit</button>
</form>
<div id="results">
   {% for p in product_list %}
       {{p.product}}<br>
       {{p.email}}
        <br><br>
   {% endfor %}
</div>

When I load the homepage, nothing shows up in the “results” div. In the GAE admin console, I can see that I have a few “Post” entities that should show up.

  • 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-08T08:13:09+00:00Added an answer on June 8, 2026 at 8:13 am

    Take a look at the docs here for querying:

    Your query part should look something like this:

    product_list = db.GqlQuery("SELECT * FROM Post")
    

    OR for NDB:

    product_list = ndb.gql("SELECT * FROM Post")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've made a guestbook application using Google App Engine(GAE):python and the client is running
Using the Python templates for Xcode, I have a simple project running on one
I need to use an embedded system running Python 1.5.2+ (!!!) with very few
I tried running a python script: print Hello, World! And I get this error:
I installed Python Mock module using PIP. When I try to import mock running
This question concerns running python files in terminal that are not stored in the
I'm working on a GAE Python app for running elections. I have an Election
I am trying to create a simple web app using Python on GAE. The
After a few months developing in GAE using google's standalone server (dev_appserver) and Aptana
Running python version 2.4.3 . I am using python-amazon-product-api . However in api.py the

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.