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

  • Home
  • SEARCH
  • 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 3237588
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:45:22+00:00 2026-05-17T17:45:22+00:00

http://code.google.com/appengine/articles/update_schema.html Trying to work this out for a nice little updater across my web

  • 0

http://code.google.com/appengine/articles/update_schema.html

Trying to work this out for a nice little updater across my web application. The only difference is rather than sorting on a StringProperty as shown in the example I am using an IntegerProperty.

No matter which way round I turn the query I cannot get it to respond correctly to my filters.

bfid = self.request.get("bfid", None)
if bfid == None:
  q = Course.all()
  q.order("-bfid")
  result = q.get()
  bfid = result.bfid

q = Course.all()
q.filter("bfid <=", bfid)
q.order("-bfid")
results = q.fetch(limit=2)

for result in results:
  print result.bfid

No matter what the bfid is, say 10, the two results it returns are 61, 62 which are the largest numbers in the set.

What have I done wrong???

  • 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-17T17:45:22+00:00Added an answer on May 17, 2026 at 5:45 pm

    You need to convert bfid to int; self.request.get() returns a string.

    You also have a problem with your logic; if bfid is None the query will be done twice, the second time with all results less than or equal to None. (This isn’t what’s causing your problem here, though.)

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

Sidebar

Related Questions

From http://code.google.com/appengine/docs/python/tools/webapp/running.html Tip: App Engine routes requests to Python scripts based on the URL
I read the document http://code.google.com/appengine/docs/python/tools/webapp/requesthandlerclass.html but I cant find any information of the args
I'm using Appstats as documented here: http://code.google.com/appengine/docs/python/tools/appstats.html It works fine, but every request now
See here: http://code.google.com/p/ie7-js/ Does anyone have any experience or remarks about this javascript? Is
Looking for feedback on : http://code.google.com/p/google-perftools/wiki/GooglePerformanceTools
I want to compile the following line of code from http://code.google.com/p/enhsim : enh::eout <<
Having trouble linking the Stomp.framework into an iPhone SDK application. http://code.google.com/p/stompframework/ I follow the
I found this via google: http://www.mvps.org/access/api/api0008.htm '******************** Code Start ************************** ' This code was
I have the following code: http://www.nomorepasting.com/getpaste.php?pasteid=22615 Which is called by the javascript mentioned in
I have to following code: http://www.nomorepasting.com/getpaste.php?pasteid=22987 If PHPSESSID is not already in the table

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.