Hi,

Currently, I develop using the development server provided, with
MEDIA_URL = '/static/' and the static files served using
django.views.static.serve(). In production, I have nginx serving
static files and proxying to Apache with mod_wsgi, with MEDIA_URL =
'http://static.example.com/' (substitute accordingly :) ).

This works very well for admin media, uploaded files, and static files
referenced from within templates (as I pass MEDIA_URL to the
templates), but for static files referenced by other static files,
e.g., stylesheets that refer to images, I end up having to manually
change say, /static/images/image.png to /images/image.png.

Is there any way for me to continue to use the development server and
yet not have to change anything other than a configuration variable in
settings.py when deploying? I am contemplating running my static files
through a script that does a regex search and replace just before
deployment, but if there is a better way, I would be very interested
to know.

Thank you,
Eugene Wee

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to