Re: Dyanmically changing Django Storage?

2014-01-27 Thread Avraham Serour
you can define the storage for each FileField when declaring your model, it will use the default unless you specify something else. Does your use case have the same model using different storages? I suggest you make different models, each using the storage you want, Lets say you have two models,

Re: Dyanmically changing Django Storage?

2014-01-27 Thread Javier Guerra Giraldez
On Mon, Jan 27, 2014 at 3:07 PM, zweb wrote: > During run time, based on file size and type, I want to use a different > storage backend. How to do it? write a storage backend proxy that picks which 'real' backend to use for each file. note that during upload, you have

Dyanmically changing Django Storage?

2014-01-27 Thread zweb
I am planning to use django-storages. It uses django settings, as DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' I read it is bad practice to change django settings during runtime. I am not using Django's FileField. During run time, based on file size and type, I want to