def all(section): nodes_query = Node.all().filter('section =', section.key()).order('inserted') return nodes_query
def index(section): # have to return an iterable (since I have no idea how to assign it to one var in the template) nodes = Node.all().filter('section =', section.key()).filter('name =', 'index') return nodes
def latest(section, limit): nodes_query = Node.all().filter('section =', section.key()).order('-inserted') nodes = None if limit > 0: nodes = nodes_query.fetch(limit) return nodes or nodes_query