I am not sure why this is the case, but I found that manually cloning filebrowser-safe, and copying the filebrowser_safe folder into the python path got me around this frustrating issue. This doesn't make sense to me, but as soon as I pip uninstall filebrowser-safe, I am able to get everything to work. I don't get it.
Additionally, for using custom URLs I ended up using AWS_S3_CUSTOM_DOMAIN since otherwise it would use the bucket-name.s3.amazonaws.com space, which I didn't want since we're using cloudfront. I also added AWS_CLOUDFRONT_URL, but that didn't seem to change anything. It appears as if the STATIC_URL / MEDIA_URL are overwritten by the s3.amazonaws.com URL otherwise. Here are my settings for reference: > > AWS_STORAGE_BUCKET_NAME = 'static-bucket' > AWS_PRELOAD_METADATA = True #helps collectstatic do updates > AWS_S3_SECURE_URLS = True > AWS_S3_CUSTOM_DOMAIN = 'static.example.com' > AWS_CLOUDFRONT_URL = 'https://static.example.com/' > STATICFILES_STORAGE = 'storages.backends.s3boto.S3BotoStorage' > DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' > #COMPRESS_ENABLED = False > # How to fix error abt MEDIA_URL and STATIC_URL > # being set the same here ? > STATIC_URL = 'https://static.example.com/' > ADMIN_MEDIA_PREFIX = STATIC_URL + 'grappelli/' > MEDIA_URL = 'https://static.example.com/media/' Extremely frustrating, I was using the latest filebrowser-safe package, so no idea why checking it out would have any affect whatsoever. Best, Tom On Wednesday, June 10, 2015 at 1:45:54 PM UTC-7, Tom Longson wrote: > > I'm trying to navigate around a very old bug with django-storages, which > has an issue with ts.strip, which is documented here: > > > https://groups.google.com/forum/#!msg/mezzanine-users/CQTvNmFa1f8/Qy7ZVcjNYGAJ > > When I switch to the revived django-storages-redux package ( > https://github.com/jschneier/django-storages/), I run into this issue: > > ImproperlyConfigured at /admin/media-library/browse/ >> Error finding Upload-Folder. Maybe it does not exist? > > Note that I am using S3 with media/uploads directories created AND set to > public. My MEDIA_ROOT is set to ''. Additionally, here are my django settings: > > > ############################ > > # S3 STATIC FILES > > # Update your bucket_name and > > # aws security id/keys > > ############################# > > AWS_QUERYSTRING_AUTH = False > > AWS_ACCESS_KEY_ID="aws key-id" > > AWS_SECRET_ACCESS_KEY= "aws access-key" > > AWS_STORAGE_BUCKET_NAME = 'static-bucket' > > AWS_PRELOAD_METADATA = True #helps collectstatic do updates > > AWS_S3_SECURE_URLS = True > > STATICFILES_STORAGE = 'storages.backends.s3boto.S3BotoStorage' > > DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' > > #COMPRESS_ENABLED = False > > # How to fix error abt MEDIA_URL and STATIC_URL > > # being set the same here ? > > STATIC_URL = 'https://static.example.com/' > > ADMIN_MEDIA_PREFIX = STATIC_URL + 'grappelli/' > > MEDIA_URL = 'https://static.example.com/media/' > > > Thanks! > > Tom > > -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
