We should serve up user-uploaded stuff when running the dev server
serve user-uploaded media with the dev server
Thanks Ryan. I'm +1 on serving media, but will get at least one other core dev to review before merging.
My only reservation is with the existing Pinax approach here in light of the new contrib staticfiles. Since static() uses DEBUG to determine whether or not to include the url, I'm thinking we should either simply rely on DEBUG explicity for both of static and site media or make sure SERVE_MEDIA is respected for both if we want to continue supporting that.
It is a bit of a shame that DEBUG is conflated like this. I always liked SERVE_MEDIA defaulting to DEBUG but allowing you to set it independently too.
I this is great and it should be merged. The behavior of the new version with regards to uploaded media in development confuses many people and I have to keep telling them to add
"+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)"
to their projects urls.py.
I wold be nice if the base projects included this line since it must often be be included manually.
Also this is basically what the version of the django-staticfiles (0.2.0 ) that shipped with the last Pinax release did
Yeah, we need to get this merged. I'll do this in a bit (either tonight or in the morning) and we'll just remove SERVE_MEDIA altogether. It's not my favorite thing, but it's consistent with staticfiles docs.