Me too, I can't get this to work and it's driving me crazy. My main
problem seems to be that Django is looking inside the Django site
package within my Python framework for the media (when I try to load
an image directly, for instance, it tells me "Page not found: /Library/
Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/
django/contrib/admin/media/img/image.gif") and I don't know how to
tell it to look in my site installation instead of python.

I'm using Python 2.5, Mac OSX, the svn version of Django, my
development server runs at http://127.0.0.1:8000/

In template I've tried:
<img src="http://127.0.0.1:8000/media/img/image.gif";>
and
<img src="media/img/image.gif">

In the site package urls I've got:
(r'^media/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': 'media'})
I also tried writing out document_root as the full absolute path to
the media directory on my computer.

MEDIA_ROOT = './media/' (relative path from settings.py, I also tried
a full absolute path)
MEDIA_URL = 'media/'

for completeness' sake, the absolute path to my media folder ought to
be /Users/<user>/Documents/Django/<sitename>/media/

I tried all the above in various configurations. It's voodoo at this
point and the gods are not smiling. If anyone can see what my problem
is I'd be very grateful for a pointer...

Thanks,
Eric


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