Defined a simple Image model:

class Image(models.Model):
    image = models.ImageField(upload_to='mockups/%Y/%m/%d')


settings.py:
MEDIA_ROOT = '/home/panos/web-projects/media/panosart/'

MEDIA_URL = 'http://10.0.0.5:8000/site_media/'


urls.py:
(r^site_media/(?P<path>.*)$', django.views.static.serve',
{'document_root': '/home/panos/web-projects/media/panosart',
'show_indexes': True}),


The problem is this: When I upload an image from the admin section it
uploads fine *but*,

the actual url path is:
http://10.0.0.5:8000/site_media/mockups/2006/10/08/image.png

while the admin section links me to:
http://10.0.0.5:8000/mockups/2006/10/08/image.png

ie, it skips 'site_media' in the URL.

Is there any way to fix this?


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