How to get the distinct value of one of my models in Google App Engine
I have a model, below, and I would like to get all the distinct area values. The SQL equivalent is select distinct area from tutorials class Tutorials(db.Model): path = db.StringProperty() area = db.StringProperty() sub_area = db.StringProperty() title = db.StringProperty() content = db.BlobProperty() rating = db.RatingProperty() publishedDate = db.DateTimeProperty() published = db.BooleanProperty() I know that in Python I can do a = ['google.com', 'livejournal.com', 'livejournal.com', 'google.com', 'stackoverflow.com'] b = set(a) b >>> set(['livejournal.com', 'google.com', 'stackoverflow.com'