I'm using Django, and have a form where a user can add a new database
row.
My my model declares the following field:

adminApproved = db.BooleanProperty()

In the user form, I have excluded the "adminApproved" field, thus when
I go to the GAE Admin and browse the rows, the boolean field has a
value of "None".

So I need to build an admin list of all rows that the admin needs to
approve.
However, when I run this command:
  db.GqlQuery  ("SELECT * FROM tablename WHERE adminApproved = None
ORDER BY tablenameField")
then I get this error: "Parse Error: Invalid WHERE condition at symbol
None. "

Note: If I put the word None is single quotes, the query runs, it just
doesn't return anything.

GOOD NEWS - As I was writing this question, I found the solution - so
I figured I would go ahead and post it here for others.

 db.GqlQuery
    ("SELECT * FROM tablename WHERE adminApproved = :1 ORDER BY
tablenameField", None)

Apparently the constant was the issue, and by binding to the keyword
"None", the problem is solved.


Thanks,
Neal Walters





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to