Support for the bundle command

This is primarily meant to be used via 3rd party applications (like the
Blender Cloud). The external software requires a bundle, and if was
already build it gets served a local filesystem path, that can be
further used. Otherwise the bundle is built.
This commit is contained in:
2015-01-12 18:15:54 +01:00
parent 1379f375ee
commit 0f80f31ac4
6 changed files with 136 additions and 21 deletions

View File

@@ -59,13 +59,11 @@ auth = HTTPBasicAuth()
try:
import config
except ImportError:
config = None
if config is None:
app.config["ALLOWED_EXTENSIONS"] = {'txt', 'mp4', 'png', 'jpg', 'jpeg', 'gif', 'blend', 'zip'}
else:
app.config.from_object(config.Development)
except ImportError:
app.config["ALLOWED_EXTENSIONS"] = {'txt', 'mp4', 'png', 'jpg', 'jpeg', 'gif', 'blend', 'zip'}
app.config["STORAGE_BUNDLES"] = "/tmp/bam_storage_bundles"
db = SQLAlchemy(app)
log = logging.getLogger("webservice")