/orbi.py Secret
Created
August 27, 2014 17:54
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
from orbi import Post | |
posts = Post.query.order_by(Post.created_at.desc())[:100] | |
for i in range(3): | |
print random.choice(posts) | |
'''결과 | |
<Post id=4816297> | |
<Post id=4816634> | |
<Post id=4815873>''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment