def __unicode__(self): """ Returns the base filename (without directory or extension. """ try: return u'%s' % imaging.get_filename_components(self.image)['file_base'] except: return u'Image not found'
def get_mime_type(self): file_ext = get_filename_components(self.file)['file_ext'] if file_ext == '.m4a': return u'audio/aac' elif file_ext == '.mp3': return u'audio/mpeg' else: return u'Unknown'
def get_mime_type(self): file_ext = get_filename_components(self.file)['file_ext'] if file_ext == '.m4a': return u'audio/aac' elif file_ext == '.mp3': return u'audio/mpeg' else: return u'Unknown'
def __unicode__(self): """ Returns the base filename (without directory or extension. """ try: return u'%s' % imaging.get_filename_components( self.image)['file_base'] except: return u'Image not found'
def get_file_extension(self): extension = imaging.get_filename_components(self.file)["file_ext"] return extension[1:]
def __unicode__(self): """Returns the base filename (without directory or extension.""" return u"%s" % imaging.get_filename_components(self.image)["file_base"]
def get_file_extension(self): extension = imaging.get_filename_components(self.file)['file_ext'] return extension[1:]