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

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

src/f/l/flamejam-HEAD/flamejam/views/game.py   flamejam(Download)
 
    if action == "delete":
        db.session.delete(p)
    db.session.commit()
    return redirect(url_for("edit_game", jam_slug = p.game.jam.slug, game_id = p.game.id))
        s.move(1)
    elif action == "delete":
        db.session.delete(s)
        i = 0
        for x in s.game.screenshotsOrdered:

src/f/l/flamejam-HEAD/flamejam/models/user.py   flamejam(Download)
        # delete registration
        if self.getParticipation(jam):
            db.session.delete(self.getParticipation(jam))
 
    def numberOfGames(self):

src/f/l/flamejam-HEAD/flamejam/views/admin.py   flamejam(Download)
        u.leaveJam(r.jam)
    for i in u.invitations:
        db.session.delete(i)
    db.session.delete(u)
    db.session.commit()

src/f/l/flamejam-HEAD/flamejam/models/team.py   flamejam(Download)
            game.destroy()
        for invitation in self.invitations:
            db.session.delete(invitation)
        db.session.delete(self)
 

src/f/l/flamejam-HEAD/flamejam/models/invitation.py   flamejam(Download)
    def accept(self):
        self.team.userJoin(self.user)
        db.session.delete(self)
        db.session.commit()
 
    def decline(self):
        db.session.delete(self)

src/f/l/flamejam-HEAD/flamejam/models/game.py   flamejam(Download)
    def destroy(self):
        # destroy all ratings, comments, packages, screenshots
        for rating in self.ratings:
            db.session.delete(rating)
        for comment in self.comments:
            db.session.delete(comment)
        for package in self.packages:
            db.session.delete(package)
        for screenshot in self.screenshots:
            db.session.delete(screenshot)
        for screenshot in self.screenshots:
            db.session.delete(screenshot)
        db.session.delete(self)
 
    def url(self, **values):

src/f/l/flamejam-HEAD/flamejam/views/misc.py   flamejam(Download)
        if not user.new_email and user.registered < datetime.utcnow() - timedelta(days=7):
            msg += "deleted user " + user.username + " for being unverified too long\n"
            db.session.delete(user)
 
    # Remove invitations after game rating has started
                for i in team.invitations:
                    msg += "deleted invitation " + str(i.id) + " on jam " + jam.slug + " - jam rating has started\n"
                    db.session.delete(i)
 
    db.session.commit()

src/f/l/flamejam-HEAD/flamejam/views/team.py   flamejam(Download)
        if current_user not in team.members: abort(403)
        flash("You have revoked the invitation for %s." % invitation.user.username, "success")
        db.session.delete(invitation)
        db.session.commit()
        return redirect(url_for("team_settings", jam_slug = team.jam.slug))