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 ratings
rating1 = Rating(best_game, peter, "Cool stuff", 3)
rating2 = Rating(best_game, paul, "", 10)
rating3 = Rating(space_game, paul, "Awesome space action!", 3)
rating4 = Rating(clone, paul, "Something something", 9)

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
        new = rating == None
        if not rating:
            rating = Rating(game, current_user, form.note.data, form.score.data)
            db.session.add(rating)
        else:

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