def get_tags(): return Tag.gql("ORDER BY name").fetch(1000)
def get_articles(day, tagstring): if tagstring != None: tag = Tag.gql("WHERE name = :1", tagstring).fetch(1)[0].key() return Article.gql("WHERE date <= :1 AND tags = :2 ORDER BY date desc", day, tag).fetch(1000) return Article.gql("WHERE date <= :1 ORDER BY date desc", day).fetch(1000)