serve user-uploaded media with the dev server #39

merged 1 commit into from Mar 8, 2012

4 participants


We should serve up user-uploaded stuff when running the dev server

@tubaman tubaman serve user-uploaded media with the dev server
We should serve up user-uploaded stuff when running the dev server
Pinax Project member

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.

Pinax Project member

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
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

Pinax Project member

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.

@lukeman lukeman merged commit 04c078c into pinax:master Mar 8, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment