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

All Samples(17)  |  Call(8)  |  Derive(0)  |  Import(9)

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 users
peter = User("peter", "lol", "roflomg-peter@mailinator.com")
paul = User("opatut", "lol", "opatutlol@aol.com", is_admin = True, is_verified = True)
per = User("per", "lol", "roflomg-per@mailinator.com", is_verified = True)
pablo = User("pablo", "lol", "roflomg-pablo@mailinator.com", is_verified = True)

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
 
print "Creating user '%s' with password '%s' and email '%s'" % (username, password, email)
 
admin = User(username, password, email, is_admin = True, is_verified = True)
db.session.add(admin)
 

src/f/l/flamejam-HEAD/flamejam/views/account.py   flamejam(Download)
import sys
from random import randint
 
from flamejam import app, db, mail
from flamejam.models import User
        email = register_form.email.data
 
        new_user = User(username, password, email)
 
        body = render_template("emails/account/verification.txt", recipient = new_user, email_changed = False)

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

src/f/l/flamejam-HEAD/flamejam/views/team.py   flamejam(Download)
from flamejam import app, db
from flamejam.models import Jam, Team, Invitation, JamStatusCode, User
from flamejam.forms import TeamSettingsForm, InviteForm, LeaveTeamForm
from flask import render_template, url_for, redirect, flash, request, abort
from flask.ext.login import login_required, current_user

src/f/l/flamejam-HEAD/flamejam/views/misc.py   flamejam(Download)
 
from flamejam import app, db, mail, cache
from flamejam.models import Jam, User, Team, Game, JamStatusCode
from flamejam.utils import get_current_jam
from flask import render_template, request, url_for, redirect, flash, jsonify

src/f/l/flamejam-HEAD/flamejam/views/admin.py   flamejam(Download)
from flamejam import app, db, admin_permission, mail
from flamejam.utils import get_slug
from flamejam.models import User, Jam, Game
from flamejam.forms import JamDetailsForm, AdminWriteAnnouncement, AdminUserForm
from flask import render_template, redirect, url_for, request, flash

src/f/l/flamejam-HEAD/flamejam/models/jam.py   flamejam(Download)
            users = [r.user for r in self.participations]
        else:
            from flamejam.models import User
            users = User.query.all()
 

src/f/l/flamejam-HEAD/flamejam/views/ajax.py   flamejam(Download)
from flamejam import app, markdown_object
from flamejam.models import User
from flask import request, render_template
 
@app.route("/ajax/markdown", methods = ["POST"])