Hello,

I am storing some images in my MEDIA_ROOT and have now the problem
that I am not exactly sure how I can use them on webpages later on.

settings.py
MEDIA_ROOT = '/data/zooscan/'
MEDIA_URL = 'http://MYSERVER/mediafiles/'

In apache2.conf I added the following:
  <Location "/mediafiles/">
    SetHandler None
  </Location>

  <LocationMatch "\.(jpg|jpeg|gif|png)$">
    SetHandler None
  </LocationMatch>

In url.py
(r'^mediafiles/(?P<path>.*)$', 'django.views/static.serve',
{'document_root':settings.MEDIA_ROOT}),

So how do I know call my images?
I have tried various versions e.g.
http://MEDIA_URL/zooscan/profilepics/PIC.png

What am I missing?
Or am I completely on the wrong way?

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