I did as you told, but I can only see it, when I reload the page served by the django's inbuilt server. Kindly check this - https://mail.google.com/mail/u/0/#sent/140ee7fdc09d4f22
On Thu, Sep 5, 2013 at 2:29 AM, Kelvin Wong <[email protected]> wrote: > The MEDIA_ROOT is the local system location where the FileField in your > models is going to store incoming files. Users submit files and they are > placed in the location specified by the 'upload_to' setting of the field > (usually a directory within MEDIA_ROOT). > > > https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.FileField.upload_to > > You should remove your MEDIA_ROOT from STATICFILES_DIRS. > > Then you should review this documentation. > > https://docs.djangoproject.com/en/dev/topics/http/file-uploads/ > > The 'collectstatic' command collects your static assets, not user > submitted content. Your system is misconfigured and that is why it is > collecting user submitted files. > > K > > > On Wednesday, September 4, 2013 12:41:03 PM UTC-7, Robin Lery wrote: >> >> I have a site, where users can upload images. And it works fine in >> django's own server. But I am using apache to serve both my app and >> statics. And when I upload any image, I can't see the pics. Only when I run >> collectstatic I can see them. Do I always have to run collectstatic? Is >> there any better way to do this? >> >> my settings.py snippet: >> >> MEDIA_ROOT = 'C:/Users/Robin/web/leo/**static' >> >> STATIC_ROOT = 'C:/Users/Robin/static/' >> >> STATICFILES_DIRS = ( >> "C:/Users/Robin/web/leo/**static", >> >> apache http.cont snippet: >> >> AliasMatch ^/([^/]*\.css) C:/Users/Robin/static/styles/$**1 >> Alias /static/ C:/Users/Robin/static/ >> <Directory C:/Users/Robin/static>Order deny,allowAllow from all</Directory> >> WSGIScriptAlias / C:/Users/Robin/web/leo/leo/wsg**i.py >> <Directory C:/Users/Robin/web/leo/leo><Files wsgi.py>Order allow,denyAllow >> from all</Files></Directory> >> >> Please guide me. Any help will be appreciated greatly. Thank you! >> > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/django-users. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-users. For more options, visit https://groups.google.com/groups/opt_out.

