On Wed, Sep 2, 2009 at 7:53 AM, Ozymandias <kairoscreat...@gmail.com> wrote:
> > Karen, > > Thank you. I will give that a shot a little later this afternoon. > > The MEDIA_ROOT change really does break the sites CSS though. Not > sure why. > > Was I doing the changes correctly if I were going to be hosting this > on an actual server? I'd need to change the MEDIA_ROOT in order to > get that to work, right? > > No, serving the admin media files has no dependence on MEDIA_ROOT. ADMIN_MEDIA_PREFIX, yes, MEDIA_ROOT, no. Thus my surprise at your saying changing MEDIA_ROOT affects serving admin media files. I don't understand how that can be. Admin media files are static files, and Django isn't (generally) used to serve static files. The development server automagically serves the admin media files (keying off the value of ADMIN_MEDIA_PREFIX) from the source tree for Django, unless you tell it otherwise. For real deployment, you would set up your real web server to serve the files that match the ADMIN_MEDIA_PREFIX from wherever you have (or place) the admin media files. The mod_python doc mentions this: http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#id3 The mod_wsgi doc doesn't mention serving the admin media files specifically but does mention how to set things up for serving static files in general. (I anticipate the next question is what MEDIA_ROOT is needed for at all if Django doesn't serve static files. It's used as a base directory for where to place uploaded files: http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.FileField.upload_to I anticipate the next question being why the name MEDIA_ROOT...that I have no idea of the answer to.) Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@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 -~----------~----~----~----~------~----~------~--~---