Ejemplo n.º 1
0
 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'
Ejemplo n.º 2
0
 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'
Ejemplo n.º 3
0
 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'
Ejemplo n.º 4
0
 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'
Ejemplo n.º 5
0
 def get_file_extension(self):
     extension = imaging.get_filename_components(self.file)["file_ext"]
     return extension[1:]
Ejemplo n.º 6
0
 def __unicode__(self):
     """Returns the base filename (without directory or extension."""
     return u"%s" % imaging.get_filename_components(self.image)["file_base"]
Ejemplo n.º 7
0
 def get_file_extension(self):
     extension = imaging.get_filename_components(self.file)['file_ext']
     return extension[1:]