Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS credentials only work in base settings module #67

Closed
Alex3917 opened this issue Jul 28, 2015 · 5 comments
Closed

AWS credentials only work in base settings module #67

Alex3917 opened this issue Jul 28, 2015 · 5 comments
Labels

Comments

@Alex3917
Copy link

As per the recommendations in Two Scoops of Django, I've got two settings modules: base.py, and dev.py. Dev.py imports everything from base.py, and then adds whatever settings I need for the development environment.

For some reason my AWS credentials work fine in base.py, but Boto doesn't seem to be able to find them when they're in dev.py. No idea why, because Django itself has no issue seeing the variables in that file. (E.g. my DJANGO_SETTINGS_MODULE is set correctly.)

@mbarrien
Copy link
Contributor

Is this still an issue? It's really difficult to debug this without seeing more of your settings file, and the way this is described, it's likely to not be a django-storages issue but more with something specific to how you wrote the file.

@Alex3917
Copy link
Author

The issue was basically just that I had to define the AWS variables before doing:

from storages.backends.s3boto import S3BotoStorage

I worked around it but that's what was happening.

@jschneier
Copy link
Owner

Yes, this is due to the way that the settings are declared at the class level variable. This is unfortunately inherited legacy. It's a larger cleanup but basically my biggest desire from a maintenance perspective, should make testing easier.

@jleclanche jleclanche added s3boto and removed s3boto labels Jun 5, 2017
@jschneier
Copy link
Owner

#524 is aiming to fix this.

@jschneier
Copy link
Owner

Fixed in #524.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants