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

Media handling #551

Open
perrygeo opened this issue May 8, 2012 · 2 comments
Open

Media handling #551

perrygeo opened this issue May 8, 2012 · 2 comments

Comments

@perrygeo
Copy link
Contributor

perrygeo commented May 8, 2012

We developed the install_media command back in the day before django.contrib.staticfiles. There is some overlap between the two (namely the copying of static files) and some differences

install_media

  • changes ownership (to make sure media is writable)
  • compresses css and js
  • media folder is not distinct from static

we might want an integrated solution that harnesses the best of both. Mainly it would be nice to leverage the staticfiles app properly, keep media separate from statice, while still retaining the css/js compression

@perrygeo
Copy link
Contributor Author

Instead of csstidy , we may want to look at
SlimIt (js minifier) cssmin (cssminifier) and integrating them with the compression step?

@perrygeo
Copy link
Contributor Author

django-pipeline is almost certainly the right solution for this:

http://django-pipeline.readthedocs.org/en/latest/usage.html#collect-static

It handles compression, asset management and staticfiles from all apps. It has some good hooks for custom storage backends if we need to host media on S3. It might be a little disruptive:

  • settings would change for managing media
  • django template tags might change
  • directory structure for apps would change (each app gets a static directory)
  • docs and scripts would need to change to use collectstatic instead of install_media. We probably want to wrap it initially and provide a deprecation warning
  • unclear how the current media dir would fit into this ... media and static would be seperate so workflow would change slightly.

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

No branches or pull requests

1 participant