Thanks for the patch. Clean and simple.
Maybe that's just nitpicking but what about changing that `if` to `elif`? Because since `MEDIA_URL` must always explicitly end in slash, we might not want to add a slash if a trailing one is missing from it.