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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:54:29+00:00 2026-06-06T00:54:29+00:00

I am using App Engine to generate a HTML table corresponding to my GQL

  • 0

I am using App Engine to generate a HTML table corresponding to my GQL table.
Each HTML row will contain several data and the GQL row ID.
This ID in the HTML allows me to delete the item later.

First I give the array to the template :

 userSearch = UserSearch.all()
 us = userSearch.fetch(1000)
 template_values = { 'userSearch' : us }
 path = os.path.join(os.path.dirname(__file__), 'template/index.html')
 self.response.out.write(template.render(path, template_values))

In the template I print the ID in the HTML :

{% for us in userSearch %}
    <tr>
        <td><a href="/delete?id={{ us.ID }}">delete</a></td>
        <td>...</td>
    </tr>
{% endfor %}

But in the HTML the ID is empty, so I cannot delete my item :

class DeleteItem(webapp.RequestHandler):
    def get(self):
        id = int(self.request.get('id'))
        item = UserSearch.get_by_id(id)
        if item != None:
            db.delete(item)

I don’t know what is wrong?
I don’t even know if it’s the way to proceed… get an element to delete…
Thank you for your help

  • 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-06T00:54:31+00:00Added an answer on June 6, 2026 at 12:54 am

    Assuming 1) you are referring to the built-in id() and 2) you are using Django templating, your template syntax should instead look like this:

    {% for us in userSearch %}
        <tr>
            <td><a href="/delete?id={{ us.key.id }}">delete</a></td>
            <td>...</td>
        </tr>
    {% endfor %}
    

    If you are using Jinja2 templating the syntax would be slightly different:

    {% for us in userSearch %}
        <tr>
            <td><a href="/delete?id={{ us.key().id() }}">delete</a></td>
            <td>...</td>
        </tr>
    {% endfor %}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to generate a board (10X10) using the app engine templates and
I'm using App Engine, SDK 1.6.3 with Python 2.7. I've created a model like
I am trying to write a facebook app using app-engine-patch and pyFacebook. I am
When using Google app engine is there any benefit to use a CDN if
When using Google App Engine 1.6.4 testbed with Flask 0.8, and in particular the
I am using Google App Engine with Google's JDO implementation to save an entity
I'm using Google App Engine python. I want to know what browser the user
I'm using the app engine locally, and sometimes the JS files are being cached
I'm using Google App Engine (Python) and Chanel api. Is it possible to show
I am developing a website using Google App Engine and Django 1.0 (app-engine-patch) A

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.