Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(9)  |  Call(6)  |  Derive(0)  |  Import(3)

src/f/l/flamejam-HEAD/scripts/seed-db.py   flamejam(Download)
 
from flamejam import db
from flamejam.models import User, Jam, Game, Rating, Comment, GameScreenshot
from datetime import datetime, timedelta
 
 
# Make comments
comment1 = Comment("lol so bad", best_game, peter)
comment2 = Comment("the worst", best_game, paul)
comment3 = Comment("You don't provide a download for your game. Please add one via \"Add package\".", space_game, paul)
comment4 = Comment("I really *love* this game. It is just awesome.", space_game, paul)

src/f/l/flamejam-HEAD/flamejam/views/game.py   flamejam(Download)
from flamejam import app, db, mail
from flamejam.utils import get_slug
from flamejam.models import Jam, Game, User, Comment, GamePackage, \
    GameScreenshot, JamStatusCode, Rating
from flamejam.models.rating import RATING_CATEGORIES
 
    if current_user.is_authenticated() and comment_form.validate_on_submit():
        comment = Comment(comment_form.text.data, game, current_user)
        db.session.add(comment)
        db.session.commit()

src/f/l/flamejam-HEAD/scripts/init-db.py   flamejam(Download)
 
from flamejam import db
from flamejam.models import User, Jam, Game, Rating, Comment, GameScreenshot
from datetime import datetime, timedelta