Do I always have to run collectstatic to serve uploaded images by apache?

2013-09-04 Thread Robin Lery
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 runcollectstatic I can see them. Do I always have to run collectstatic? Is there any better

Re: Do I always have to run collectstatic to serve uploaded images by apache?

2013-09-04 Thread Kelvin Wong
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/de

Re: Do I always have to run collectstatic to serve uploaded images by apache?

2013-09-05 Thread Kelvin Wong
Check your templates. I bet your tag there is giving the wrong root relative path to the user uploads. https://docs.djangoproject.com/en/dev/ref/templates/builtins/#get-media-prefix If Apache is giving you problems, what does it say in your Apache logs? Try debugging this like you would an Apac

Re: Do I always have to run collectstatic to serve uploaded images by apache?

2013-09-05 Thread Robin Lery
This is my template. Can you please check where I am wrong... Thank you though! {% block content %} {% for Status in status %} {{ Status.creator.get_full_name }} {% if Status.image

Re: Do I always have to run collectstatic to serve uploaded images by apache?

2013-09-05 Thread Robin Lery
The problem was the easy-thumbnails tag! After I removed it, I was good to go. Thanks though! On Thu, Sep 5, 2013 at 10:41 PM, Robin Lery wrote: > my models.py : > > def get_upload_file_name(instance, filename): > return "uploaded_files/%s_%s" %(str(time()).replace('.','_'), filename) > > class

Re: Do I always have to run collectstatic to serve uploaded images by apache?

2013-09-05 Thread Robin Lery
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 wrote: > The MEDIA_ROOT is the local system location where the FileFiel

Re: Do I always have to run collectstatic to serve uploaded images by apache?

2013-09-05 Thread Robin Lery
my models.py : def get_upload_file_name(instance, filename): return "uploaded_files/%s_%s" %(str(time()).replace('.','_'), filename) class Status(models.Model): status = models.TextField() image = models.ImageField(upload_to=get_upload_file_name, blank=True) pub_date = models.DateTimeField(defaul