I think the question at hand is not where to store and serve the media
files, but how to write an app that can easily support accessing media
files from different urls.  I had this same issue between my
development and production apache servers:

Dev Site
localhost/mysite/images/whatever.gif

Production
mysite.com/images/whatever.gif

And even the occasional development on my laptop on the road
localhost/~myuser/mysite/images/whatever.gif

This was never a problem in my previous dev environment (php) because
I'd always just use relative urls like:

<img src="images/whatever.gif">

But with django's more flexible url mapping, I need to make all the
links absolute.

The most frequent suggestion is just to define a setting such as the
MEDIA_ROOT that can be set to "/images" on my production server,
"/mysite/images" on my dev and then "~myuser/mysite/images" on the
laptop example.

Looking at ruby on rails, they seem to have some template tag
equivalent that does url generation for you automatically (stolen from
the rails tutorial):
<%= link_to recipe.title.....

Perhaps django could use something similar?

Reply via email to