I'm building my first django app and having a few problems in my dev
environment.  I have a couple of images that I want to use in my
base.html template.  I have tried various configurations, but none of
my images show up.  I've tried putting the images in /media, in /media/
img, and in the main project folder.  I have tried each of those paths
in my settings.py MEDIA_ROOT.  I have also tried importing os and
using relative paths in my settings.py file.  Here are some examples
of my settings:

# MEDIA_ROOT = '/Users/anna/Documents/Projects/autodiags/media/'
# IMAGE_ROOT = '/Users/anna/Documents/Projects/autodiags/media/img/'
MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media')
MEDIA_URL = 'http://autodiagnostics.com/media/'

In my templates I am trying to access these with a regular img tag:
<img src="/media/autodiag_title.jpg"/>

I have also tried src="/autodiag_title.jpg" and without the slash.
None of my images have ever shown up.  What am I doing wrong?

Thanks for your help!

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

Reply via email to