On Mon, 12 Nov 2007 14:42:15 -0000 David <[EMAIL PROTECTED]> wrote: Hi,
> On Nov 9, 7:16 pm, David <[EMAIL PROTECTED]> wrote: > > I seem to have a similar (stupid) problem, which I just can't get: > > (Though it's not the backslashes!) > > > > This is from my settings.py: > > MEDIA_ROOT = 'C:/django/myProject/src/media/' > > MEDIA_URL = 'http://localhost:8000/media/' > > ADMIN_MEDIA_PREFIX = '/media/' I'm very new to django but had the same issue a few weeks ago. The problem is that all these variables are quite a bit misleading. First if you serve your (static) media with django then you should leave MEDIA_URL empty. Then you cannot have the ADMIN_MEDIA_PREFIX the same as the media prefix for your application (because they both use different directories). I use /amedia for ADMIN_MEDIA_PREFIX. > > > > in my html-template: > > <link href="/media/style.css" rel="stylesheet" type="text/css" /> > > > > in urls.py: > > (r'^media/(?P<path>.*)$', 'django.views.static.serve', > > {'document_root': '/media/'}), document_root should point to your media directory on the disk (so it should be C:/django/myProject/src/media/). Maybe you could just use the MEDIA_ROOT variable here. (I don't know why we need both. I just wanted to make my prototype work so I left it this way for know.) Laszlo --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---