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

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/f/l/flamejam-HEAD/flamejam/views/team.py   flamejam(Download)
def team_settings(jam_slug):
    jam = Jam.query.filter_by(slug = jam_slug).first_or_404()
    if jam.getStatus().code >= JamStatusCode.RATING:
        flash("The jam rating has started, so changes to the team are locked.", "error")
        return redirect(jam.url())
def invitation(id, action = ""):
    invitation = Invitation.query.filter_by(id = id).first_or_404()
    team = invitation.team
 
    if team.jam.getStatus().code >= JamStatusCode.RATING:
def leave_team(jam_slug):
    jam = Jam.query.filter_by(slug = jam_slug).first_or_404()
 
    if jam.getStatus().code >= JamStatusCode.RATING:
        flash("The jam rating has started, so changes to the team are locked.", "error")

src/f/l/flamejam-HEAD/flamejam/views/game.py   flamejam(Download)
 
    form = RateGameForm()
    if jam.getStatus().code != JamStatusCode.RATING:
        flash("This jam is not in the rating phase. Sorry, but you cannot rate right now.", "error")
        return redirect(game.url())

src/f/l/flamejam-HEAD/flamejam/views/misc.py   flamejam(Download)
    # Remove invitations after game rating has started
    for jam in Jam.query.all():
        if jam.getStatus().code >= JamStatusCode.RATING:
            for team in jam.teams:
                for i in team.invitations: