Thanks for the advice guys. Amit, yeah I should have mentioned that I
totally agree that django shouldn't serve static files in a production
environment. And keeping a /static/ directory sounds like a pretty good
way to do that.

I started writing something more like Andy's #2 suggestion... a way to
abstract the media root so it doesn't have to be hardcoded all over my
templates. I made a tag to generate static URLs, and hacked the django
code in order to remember a template's application's settings like the
location of the media directory (if the template belongs to a
application, that is). It works really well but I imagine there are
various kinds of issues to consider for a facility like that. And
you're right Andy, it's not really a ideal solution unless all the apps
you're using use it. Well, it sounds like the dev team has their hands
full right now with more important things like magic-removal and 1.0,
but maybe I'll float this idea after that. Mostly I just wanted to make
sure I wasn't high or completely missing the point.

Reply via email to