On Apr 2, 4:21 pm, Media Server setup <enpa...@gmail.com> wrote: > Hello, > > I have recently setup a Media server on a different box which I would > like to use to serve static files to my django application. I > personally find django documentation to be vague on this particular > topic and I was hoping if someone who has done this type of setup > before would be able to help me out here. I am using lighttpd on my > media server and django app is using apache2. Can someone please > explicitly specify what needs to go in MEDIA_URL and MEDIA_ROOT and > how does urls.py routes to a cross domain media server. I am not > interested in any local directory structure to accomplish this task > because that is insecure and inefficient. Any help would be > appreciated. > > Thanks
The whole point of having a separate media server is so that media requests don't go through urls.py at all. You just set your front-end code to point to the assets on the separate server. MEDIA_URL can be set to the address of that server if you like, so that you can use it as a variable within your templates to generate the correct URL, but Django doesn't (and shouldn't) do anything special with it. -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.