leaguevine/fantasy-ultimate

Serve static files from S3

Closed this issue · 3 comments

Kind of dumb to have all requests for static files go through our web server...

I'm going to add django-storages as a dependency to help take care of this.

I was hoping to get it done tonight but I'll most likely get it done tomorrow morning.

Okay, I just made a pretty big checkin, including messing with some of the settings variables. Not sure why, but something about having '..' in our PROJECT_ROOT was causing the static files handler to end up with wrong paths, preventing static files from being served in my dev environment. Not sure if that's related to the issue I was having in the heroku environment or not.

Anyway, the easiest way to check that the static files are being served correctly is to navigate to /admin. It tries to download some static CSS files, so you'll see the page all unstyled and errors in your console if it's busted.

Cool, thanks for the info.

I fixed this in commits 3986dc0 and 12bc11d

The media should still work fine on localhost, and it connects to S3 for production. Turning USE_STATICFILES to True within settings.py on localhost lets you use the files on S3 if you want.