Hi Andrew,

Django has two separate settings for "static" files and "media" files.
Static files are things you create that are part of the site itself,
whereas media files are added to the site as content. Django handles them
somewhat differently – particularly the fact that static files need to be
collected from multiple sources (using 'manage.py collectstatic') – and
therefore has separate settings for each.

You should look up the MEDIA_ROOT and MEDIA_URL settings, and configure
Nginx to serve files as MEDIA_URL from whatever path you have set in
MEDIA_ROOT. https://docs.djangoproject.com/en/1.4/ref/settings/#media-root

Note: uwsgi isn't involved in this process.

-- 
Rob Speed
speed....@gmail.com


On Thu, Apr 25, 2013 at 2:42 AM, AndrewLvov <trusted...@gmail.com> wrote:

> There is a question and a problem, actually )
>
> During deployment, I've collected static files into a folder
> /opt/project_name/static.
> The files began being served normally except cached images. It looks like
> no matter what I do, some pages contain image urls like
> mysite.com/media/cache/65/8d/658d063b497b2bd1ea6bf135896566c8.jpg and
> thus not displayed.
> Clearing cache using cache.clear() and ./manage.py thumbnail clear doesn't
> help. As well as restarting uwsgi, nginx and so on.
>
> Also, I don't understand how satchmo is expected to know where to put
> cached files, since they are served from /opt/project_name/static folder.
> Do I need to configure this folder somewhere in settings.py ?
>
> How do I resolve both issues ?
>
> Thank you a lot, stuck with these issues a half of day already (
>
> --
> You received this message because you are subscribed to the Google Groups
> "Satchmo users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to satchmo-users+unsubscr...@googlegroups.com.
> To post to this group, send email to satchmo-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/satchmo-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Satchmo users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to satchmo-users+unsubscr...@googlegroups.com.
To post to this group, send email to satchmo-users@googlegroups.com.
Visit this group at http://groups.google.com/group/satchmo-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to