Comment #6 on issue 136 by arockinit: MEDIA_ROOT in settings.py ignored for  
document_root
http://code.google.com/p/django-hotclub/issues/detail?id=136

I've been sloppy with my use of MEDIA_ROOT and MEDIA_URL, I apologize. I'm  
still
updating my skillset from PHP to Python/Django.

--------

If one goes to this URL, one gets the logo image

http://127.0.0.1:8000/site_media/pinax/images/logo.png

If one changes MEDIA_URL in settings.py to "/images/", the following URL  
does not
work.  It is still the URL with site_media:

http://127.0.0.1:8000/images/pinax/images/logo.png

One has to modify the urls.py file directly to make the change:

pinax/projects/complete_project/urls.py:103-106
if settings.SERVE_MEDIA:
     urlpatterns += patterns('',
         (r'^site_media/(?P<path>.*)$', 'misc.views.serve')
     )

To:

if settings.SERVE_MEDIA:
     urlpatterns += patterns('',
         (r'^%s(?P<path>.*)$' % settings.MEDIA_URL, 'misc.views.serve')
     )

--------

I would propose making that change to urls.py and changing MEDIA_URL  
to 'site_media/'
(without the leading slash in my example, or with it in yours). If somebody  
is using
a non-development server it won't matter, and if they are using the  
development
server, it makes it easy to make the change (for first time users).

Anyway, this is really a trivial problem - I'm fine with marking this as  
WONTFIX and
moving on.



--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to