Example #1
0
 def __init__(self, *args, **kwargs):
     from restthumbnails import defaults
     self.storage = defaults.storage_backend()
     self.source_storage = defaults.source_storage_backend()
     super(ThumbnailFile, self).__init__(*args, **kwargs)
Example #2
0
def sendfile(request, thumbnail, **kwargs):
    from restthumbnails import defaults
    storage = defaults.storage_backend()
    return serve(request, thumbnail.name, storage.location)
Example #3
0
 def setUp(self):
     from restthumbnails import defaults
     self.storage = defaults.storage_backend()
     self.storage.cleanup()
 def __init__(self, *args, **kwargs):
     from restthumbnails import defaults
     self.storage = defaults.storage_backend()
     self.source_storage = defaults.source_storage_backend()
     super(ThumbnailFile, self).__init__(*args, **kwargs)