Can someone help me understand how to access the results of a query?
This is my model:
class Rep(db.Model):
mAUTHOR = db.UserProperty(auto_current_user=True)
mUNIQUE = db.StringProperty()
mCOUNT = db.IntegerProperty()
mDATE = db.DateTimeProperty(auto_now=True)
mDATE0 = db.Date
Hi Zeynel,
I don't use templates but as a guess i think you use result.mCOUNT
To sort you can read the result in a list and sort on this or maybe
the template engine has a solution for this.
gr
wim
On Wed, Nov 10, 2010 at 2:56 PM, Zeynel wrote:
> Can someone help me understand how to access the r
RESULTS = QUERY.fetch(10)
RESULTS.sort(key=lambda x: x.mDATE.toordinal() * x.mCOUNT)
What is a "list of model instances?
You can start by learning some basic python. Read the tutorial on the
python.org website, or in the help file (on windows platform)
2010/11/10 Zeynel :
> Can someone help me un
This is unrelated but you will probably want to read the Python coding style
guide:
http://www.python.org/dev/peps/pep-0008/
It's bad form to name your instance variables the way they're named in your
sample code.
--
Ikai Lan
Developer Programs Engineer, Google App Engine
Blogger: http://googlea