blog/app/models/images.py
def expand_image(oid=None):
    """ Pass in an image OID to get the MDB record for that image back as a
    dict. """

    if not ObjectId.is_valid(oid):
        raise ValueError("Invalid image asset OID! %s" % oid)

    record = app.config['MDB'].images.find_one({'_id': oid})
    if record is None:
        err = "OID '%s' not associated with an image!" % oid
        app.logger.error(err)
        app.logger.error('Using default image...')
        record = {'base_name': 'unknown_image.jpg'}

    return dict(record)
 Pass in an image OID to get the MDB record for that image back as a
    dict. 
Pass in an image OID to get the MDB record for that image back as a
dict.
Pass in an image OID to get the MDB record for that image back as a dict .
def expand_image(oid=None):
    if not ObjectId.is_valid(oid):
        raise ValueError("Invalid image asset OID! %s" % oid)
    record = app.config['MDB'].images.find_one({'_id': oid})
    if record is None:
        err = "OID '%s' not associated with an image!" % oid
        app.logger.error(err)
        app.logger.error('Using default image...')
        record = {'base_name': 'unknown_image.jpg'}
    return dict(record)
def expand_image ( oid = None ) : if not ObjectId . is_valid ( oid ) : raise ValueError ( "Invalid image asset OID! %s" % oid ) record = app . config [ 'MDB' ] . images . find_one ( { '_id' : oid } ) if record is None : err = "OID '%s' not associated with an image!" % oid app . logger . error ( err ) app . logger . error ( 'Using default image...' ) record = { 'base_name' : 'unknown_image.jpg' } return dict ( record )
Pass in an image OID to get the MDB record for that image back as a
dict.
Pass in an image OID to get the MDB record for that image back as a dict .
""" Pass in an image OID to get the MDB record for that image back as a
    dict. """
oid