示例#1
0
def article(request, id):
    """Return information about a specific article."""
    return [Article.objects(published=True).get(pk=id)]
示例#2
0
def modified(request):
    """Return articles sorted by modification date."""
    return Article.objects(published=True).order_by("-date")