def get_context(self): self.default_filename = 'image' cfg = Config() cfg.UPLOAD_ENABLED = True cfg.UPLOAD_PHOTO_STORAGE = 'thumbor.storages.file_storage' cfg.FILE_STORAGE_ROOT_PATH = self.root_path cfg.UPLOAD_DELETE_ALLOWED = False cfg.UPLOAD_PUT_ALLOWED = True cfg.UPLOAD_DEFAULT_FILENAME = self.default_filename cfg.MAX_ID_LENGTH = 36 importer = Importer(cfg) importer.import_modules() return Context(None, cfg, importer)