示例#1
0
def all(section):
    nodes_query = Node.all().filter('section =', section.key()).order('inserted')
    return nodes_query
示例#2
0
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
示例#3
0
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