def save(self, *args, **kwargs):
     self=self
     tmpfile, self.filetype = thumbnailer2.thumbnailify(self.fileobject, (self.filex, self.filey))
     #Bleh, this is awful. Means we won't have to refactor a bunch of other stuff, but implies some deeper architecture issues.
     if self.filetype=="text":
         self.filetype="norender"
     self.filename = tmpfile
     super(thumbObjectProxy, self,).save(generate=False, *args, **kwargs)
Esempio n. 2
0
def thumbTask(thumbnail, fullfile):
   from thumbnailer import thumbnailer2
   from filemanager.models import fileobject, thumbobject
   thumbnail.filename, thumbnail.filetype = thumbnailer2.thumbnailify(fullfile, (thumbnail.filex, thumbnail.filey))
   #Bleh, this is awful. Means we won't have to refactor a bunch of other stuff, but implies some deeper architecture issues.
   if thumbnail.filetype=="text" or thumbnail.filetype=="" or thumbnail.filetype=="norender":
      thumbnail.filetype="norender"
      thumbnail.filename = None
   thumbnail.save(generate=False)
def thumbTask(thumbnail, fullfile):
   from thumbnailer import thumbnailer2
   from filemanager.models import fileobject, thumbobject
   thumbnail.filename, thumbnail.filetype = thumbnailer2.thumbnailify(fullfile, (thumbnail.filex, thumbnail.filey))
   #Bleh, this is awful. Means we won't have to refactor a bunch of other stuff, but implies some deeper architecture issues.
   if thumbnail.filetype=="text" or thumbnail.filetype=="" or thumbnail.filetype=="norender":
      thumbnail.filetype="norender"
      thumbnail.filename = None
   thumbnail.save(generate=False)
 def save(self):
     super(fileobject, self).save()
     self.filetype = thumbnailer2.thumbnailify(self, (1, 1))[1]
     super(fileobject, self).save()
Esempio n. 5
0
    def save(self):
        super(fileobject, self).save()

        self.filetype = thumbnailer2.thumbnailify(self, (1,1))[1]
        super(fileobject, self).save()
 def save(self,*args, **kwargs):
     self.filetype = thumbnailer2.thumbnailify(self, (1,1))[1]
     super(fileobject, self).save(*args, **kwargs)