18F / 2015-foia-hub

A consolidated FOIA request hub.
Other
48 stars 17 forks source link

django-storages doesn't work well with two buckets. #773

Open geramirez opened 9 years ago

geramirez commented 9 years ago

django storages was not designed to work with two buckets. The override is causing issues with migrations.

geramirez commented 9 years ago

Using the same bucket with two locations like this might go more smoothly.

khandelwal commented 9 years ago

Please provide more details around what sorts of issues you're seeing. Are there logs?

geramirez commented 9 years ago

Mainly the migrations change depending on the bucket we are using. We'll need to find a better way to override the default.

operations = [
    migrations.AlterField(
        model_name='document',
        name='original_file',
        field=models.FileField(storage=storages.backends.s3boto.S3BotoStorage(bucket='18f-foia-krang-docs'), blank=True, null=True, upload_to=docusearch.models.upload_original_to),
    ),
]