Hi, On Sat, May 14, 2011 at 10:24 AM, Shawn Milochik <[email protected]> wrote:
> Did you read the docs? > http://docs.djangoproject.com/en/1.3/ref/contrib/staticfiles/ > > To use the staticfiles app you need to not only put the right things in > settings.py, but also run manage.py collectstatic to gather up all your > static content, then rsync/copy/whatever that content to the proper location > on your server so that the stuff you put in settings.py is valid. > > Same thing for media, to some extent (no 'collectstatic' analog). Django's > not going to serve your media or your static content in production. That's > going to be up to your Web server (Apache/nginx/lighttpd/whatever), and > setting that up properly is your job. It's way outside of the scope of > Django to do this for you. > > If django is not going to serve media in production and we totally depend on webserver to do that then what is the point in having variables such as MEDIA and STATIC ? Probably, one can setup -static media- on the webserver which could be accessed as www.url/media and thus refer to this relative path as /media in templates instead of {{MEDIA}} or {{STATIC}}; which is much simpler than meddling with STATIC or MEDIA variables. Isnt it ? KM > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" 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/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" 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/django-users?hl=en.

