Thank you for tips. Now I want that when an user upload an image ( through forms ), then it will be saved in media.example.com. This is the point that I don't understand :-\
----------- On Jan 18, 1:08 am, Malcolm Box <malcolm....@gmail.com> wrote: > On Sat, Jan 16, 2010 at 3:20 PM, nameless <xsatelli...@gmail.com> wrote: > > I have a site developed with django atwww.example.com > > > I want that django insert/serve static files ( images, css, js, ect ) > > in/from media.example.com. > > Are these files that Django is managing (e.g. via an upload), or just part > of the output HTML? > > If just part of the output HTML, all you need to do is go through your > templates and change the paths in the URLs to point to > media.example.comrather thanwww.example.com. For bonus points, change them > to use {{ MEDIA_URL > > }}/path/to/image and pass MEDIA_URL into your template functions. > > I have edited settings.py: > > > MEDIA_ROOT = 'http://media.miosito.it' > > > MEDIA_URL = 'http://media.miosito.it' > > > ADMIN_MEDIA_PREFIX = 'http://media.miosito.it' > > MEDIA_ROOT needs to be a directory path, not a URL - it's where Django will > store uploaded files for any ImageField members. > > > And now ? What do I do ? > > That depends :) > > Malcolm
-- 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.