On 1/9/07, archie <[EMAIL PROTECTED]> wrote:
> In the settings.py file I set the MEDIA_ROOT to be the one
> where the css is and I added to urls the command
> (r'^site_media/(.*)$', Where django.views.static, {'document_root':
> settings.MEDIA_ROOT, 'show_indexes': True}).
> However no sign of django picking up the css file. Any idea?!

I think you meant django.views.static.serve, not django.views.static.

FYI, static.serve is OK for dev, but you should really run another
media server for production.

A common setup is lighttpd listening on some other port w/ apache's
mod_proxy mapping /media to that other server:
http://httpd.apache.org/docs/2.0/mod/mod_proxy.html#proxypass
Another approach is to make a media subdomain (i.e. media.yoursite.com
) but then you need to make media references in your pages absolute
(e.g. http://media.yoursite.com/img/foo.jpg rather than
/media/img/foo.jpg).

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