django-simplestatic icon indicating copy to clipboard operation
django-simplestatic copied to clipboard

AWS_ settings

Open gtaylor opened this issue 12 years ago • 1 comments

Rather than these more generic settings like AWS_STORAGE_BUCKET_NAME, django-simplestatic should probably at the very least check on more specifically named settings that don't clash with django-storage's.

For example, we don't want our django-storages backed FileFields uploading to the same bucket as our static media. Our AWS_STORAGE_BUCKET_NAME is current myproject-uploads, but django-simplestatic lacks a way to do something like SIMPLESTATIC_BUCKET = 'myproject-static'

I'd be glad to provide a pull request if you decide how you want this to work. I'd suggest:

  • SIMPLESTATIC_BUCKET

And optionally :

  • SIMPLESTATIC_AWS_ACCESS_KEY_ID
  • SIMPLESTATIC_AWS_SECRET_ACCESS_KEY

Or perhaps we go dict config:

SIMPLESTATIC = {
    'BUCKET': 'blah',
    'AWS_ACCESS_KEY_ID': '123456788',
    'AWS_SECRET_ACCESS_KEY': 'sdfsfsdfdf',
}

If any django-simplestatic configs aren't specified, we use the standard django-storages ones (the current behavior).

gtaylor avatar Mar 02 '13 04:03 gtaylor

I actually completely agree with this. Let's just prefix everything with SIMPLESTATIC, so:

SIMPLESTATIC_AWS_ACCESS_KEY_ID SIMPLESTATIC_AWS_SECRET_ACCESS_KEY SIMPLESTATIC_AWS_BUCKET_NAME

I'd love a patch, but if not I'll fix this myself the next chance I get.

ericflo avatar Mar 19 '13 09:03 ericflo