Michael,

You are right: the Django admin was stepping on my media directory. I
changed the name of "media" directory to "my_media" and now everything
works fine.

Thank you very much for your help.


By the way, thank you also for your blog, which is an invaluable
source of learning for every django newbie like me.


On 22 Dic, 22:37, Empty <[EMAIL PROTECTED]> wrote:
> > I'm having some problems to serve static files in the development
> > environment.
>
> First, have you read 
> this:http://www.djangoproject.com/documentation/static_files/
>
> > The directory that actually contains the static files under OSX is:
>
> > /Users/paolo/Sites/SF06/sensationalfly/media/
>
> > I modified the settings.py MEDIA_ROOT parameter to:
>
> > MEDIA_ROOT = '/Users/paolo/Sites/SF06/sensationalfly/'
>
> > and MEDIA_URL to:
>
> > MEDIA_URL = '/'
>
> These really have nothing to do with it.
>
> > However, the following html tag doesn't'work (no image loaded):
>
> > <img src="/media/media/thumbnails/test_image.png" />
>
> > Furtheremore, when I try the following URL:
>
> >http://127.0.0.1:8000/media/test_image.png
>
> > I receive this error message:
>
> > Page not found: /Library/Python/2.5/site-packages/django/contrib/admin/
> > media/test_image.png
>
> The Django admin is stepping on your media (sigh).  If you want to use
> /media/ as your location for your media, then you need to modify
> ADMIN_MEDIA_PREFIX to something else, like say /adminmedia/
>
> http://www.djangoproject.com/documentation/settings/#admin-media-prefix
>
> I assume you're using the built-in webserver (runserver) and if you
> are the static files link I gave you will help.  If you're trying to
> do this through apache then you just need to setup apache to serve
> your media and make sure you set the handler to none for that
> location.
>
> If you still are having problems, jump on IRC and we'll walk you through it.
>
> Michael Trier
> blog.michaeltrier.com
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to