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

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)
TODO: Highly consider moving "name" into a new table.
TODO: Consider preloading said table in software

src/m/e/mediagoblin-spaetz-0.3.2.dev/mediagoblin/db/sql/convert.py   mediagoblin-spaetz(Download)
from mediagoblin.db.sql.base import Session
from mediagoblin.db.sql.models_v0 import Base_v0
from mediagoblin.db.sql.models_v0 import (User, MediaEntry, MediaComment,
    Tag, MediaTag, MediaFile, MediaAttachmentFile, MigrationData,
    ImageData, VideoData, AsciiData, AudioData)
 
        for key, value in entry.media_files.iteritems():
            new_file = MediaFile(name=key, file_path=value)
            new_file.media_entry = new_entry.id
            Session.add(new_file)