Closed Bug 906176 Opened 12 years ago Closed 10 years ago

/media to /static conversion

Categories

(www.mozilla.org :: Bedrock, defect, P3)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: bensternthal, Assigned: pmac)

Details

(Whiteboard: [kb=1080508] )

This is already in a PR, creating a bug to track. https://github.com/mozilla/bedrock/pull/893
Whiteboard: [kb=1080508]
Priority: -- → P3
Depends on: 924467
Assignee: nobody → pmac
No longer depends on: 924467
Commits pushed to master at https://github.com/mozilla/bedrock https://github.com/mozilla/bedrock/commit/90aabcb5bc0c44ec817582ef17db1a8ec487750f Bug 906176: Move to using Django staticfiles for media. This keeps the URL for CSS/JS/Images/Etc. as /media/ so that all of the .less files and urls around the net need not change. The new MEDIA_URL is '/user_media/', and the STATIC_URL is '/media/'. The files all stay in the 'media' folder in the project, but they'll now be served from the 'static' folder after 'collectstatic' is run. All templates, views, and tests have been updated for the new changes, as well as the l10n media helpers. The site works well for me in spot-checks, and the tests pass. One caveat is that you must run 'manage.py collectstatic' before running tests due to the way jingo-minify works regarding the compilation of .less files when not in DEBUG mode. I've yet to find a way around this. https://github.com/mozilla/bedrock/commit/66541a947d92a910301f5b5118c8094c8f27d5d6 Bug 906176: Enable caching static storage and remove cachebusts. Removes all of the "?2015-01" mess from images around the site. Enables the built in django processor that will add the md5 hash of the file contents to the file name then use that name in the html when we use the "static()" helper in templates. The post-processor also handles references to images in the CSS. Use default staticfiles storage when testing. https://github.com/mozilla/bedrock/commit/286c35c047875cd58226cdc61b3613a0cb3a8743 Bug 906176: Move to django-pipeline from jingo-minify. This includes some fixes for `static()` template calls. We can backport those if we want to not go this way. Fix high_res_img path problems. Move to a Python 2.6 compatible Manifest staticfiles storage. Make collectstatic quiet. Use manifest storage on travis. Fix high_res_img and platform_img helpers for new filenames. https://github.com/mozilla/bedrock/commit/0e57d1e47923039c507f4ed0e8168d31f8c86c5f Merge pull request #2672 from pmclanahan/staticfiles-doinit-foreal-this-time Bug 906176: Move to using Django staticfiles for media.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
This is in production.
Status: RESOLVED → VERIFIED
(In reply to Josh Mize [:jgmize] from comment #2) > This is in production. Wow! Congratulations!
(In reply to Hector Zhao [:hectorz] from comment #3) > Wow! Congratulations! Thanks again for all of your work on this a while back Hector. It was a great first try and taught us a lot about how we should go about it. It's just unfortunate it took us this long to finally get it pushed out.
You need to log in before you can comment on or make changes to this bug.