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

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

src/m/e/mediadrop-HEAD/mediadrop/controllers/admin/media.py   mediadrop(Download)
        media.update_status()
        DBSession.add(media)
        DBSession.flush()
 
        if id == 'new' and not has_thumbs(media):
            media.reviewed = True
            DBSession.add(media)
            DBSession.flush()
        else:
            media = fetch_row(Media, id)
                file.storage.delete(file.unique_id)
                DBSession.delete(file)
                DBSession.flush()
                # media.files must be updated to reflect the file deletion above
                DBSession.refresh(media)
            data['file_type'] = file.type
            media.update_status()
            DBSession.flush()
 
            # Return the rendered widget for injection
        and not input.slug.startswith('_stub_'):
            DBSession.delete(input)
            DBSession.flush()
            orig.podcast = input.podcast
            orig.title = input.title

src/m/e/mediadrop-HEAD/mediadrop/controllers/admin/podcasts.py   mediadrop(Download)
        if id == 'new':
            DBSession.add(podcast)
            DBSession.flush()
            create_default_thumbs_for(podcast)
 

src/m/e/mediadrop-HEAD/mediadrop/controllers/admin/categories.py   mediadrop(Download)
 
            DBSession.add(cat)
            DBSession.flush()
 
            data = dict(

src/m/e/mediadrop-HEAD/mediadrop/controllers/admin/tags.py   mediadrop(Download)
            tag.slug = get_available_slug(Tag, kwargs['slug'], tag)
            DBSession.add(tag)
            DBSession.flush()
            data = dict(
                success = True,

src/m/e/mediadrop-HEAD/mediadrop/model/auth.py   mediadrop(Download)
 
        DBSession.add(user)
        DBSession.flush()
        return user
 
        group = Group(**defaults)
        DBSession.add(group)
        DBSession.flush()
        return group
 
        permission = Permission(**defaults)
        DBSession.add(permission)
        DBSession.flush()
        return permission
 

src/m/e/mediadrop-HEAD/mediadrop/model/media.py   mediadrop(Download)
            setattr(media, key, value)
        DBSession.add(media)
        DBSession.flush()
        return media
 

src/m/e/mediadrop-HEAD/mediadrop/model/tags.py   mediadrop(Download)
        new_tags = [{'name': n, 'slug': s} for s, n in uniques.iteritems()]
        DBSession.execute(tags.insert(), new_tags)
        DBSession.flush()
        # Query for our newly created rows and append them to our result set.
        results += Tag.query.filter(Tag.slug.in_(uniques.keys())).all()

src/m/e/mediadrop-HEAD/mediadrop/model/categories.py   mediadrop(Download)
 
        DBSession.add(category)
        DBSession.flush()
        return category
 

src/m/e/mediadrop-HEAD/mediadrop/controllers/admin/comments.py   mediadrop(Download)
            DBSession.add(comment)
 
        DBSession.flush()
 
        if request.is_xhr:

src/m/e/mediadrop-HEAD/mediadrop/lib/auth/tests/mediadrop_permission_system_test.py   mediadrop(Download)
    def test_metagroup_assignment_does_not_fail_if_groups_are_not_found_in_db(self):
        DBSession.delete(self.anonymous)
        DBSession.delete(self.authenticated)
        DBSession.flush()