Thanks Jay but that doesn't appear to make any difference.  I wonder
is it how i have settings.py set up but nothing jumps out at me when
trying to find where I've gone wrong.  Don't know if its important but
I'm on a mac and I'm trying to accomplish this through the built-in
dev server.  Not much success with mod_python and fcgi setups either.

just for the sake of it here's the important bit in the settings:

MEDIA_ROOT = "/Users/whitebook/django/django_projects/myproject/static/"
MEDIA_URL = "http://localhost:8000/static/";
ADMIN_MEDIA_PREFIX = "/media/"

and as i say in the top urls.py it reads

        (r'^static/(?P<path>.*)$', 'django.views.static.serve',
{'document_root':
'/Users/whitebook/django/django_projects/myproject/static/',
'show_indexes':True}),

If changed that from my original post but doesn't make any difference!

Thanks for your help

On 11/09/06, Jay Parlar <[EMAIL PROTECTED]> wrote:
>
> On 9/10/06, Alfonso <[EMAIL PROTECTED]> wrote:
> >
> > Complete newbie problem here but i can't seem to get django to show
> > any images or stylesheets etc.
> > In urls.py:
> >
> >         (r'^images/(?P<path>.*)$', 'django.views.static.serve',
> > {'document_root': '/Users/whitebook/django/django_projects/mysite/
> > media/images'}),
> >
> > In the template I have <img src="images/logo.gif">.
> >
> > So when opening up the site in Safari the dreaded blue question mark
> > appears where an image should be - opening the 'image' in a new tab
> > yields 'ViewDoesNotExist at images/logo.gif'
> >
> > Any suggestions?  I've had a thorough search for a solution but
> > nothing seems to work.
> >
> > Thanks!
> >
> > P.S apologies to deezthugs for attaching my query to his query!
>
> Well, my guess would be that you're using a relative URL, ie., it
> doesn't start with a '/'. Try using
>
> <img src="/media/images/logo.gif">
>
> Jay P.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to