Thank you a lot, Olivier. Probably, thumbnail cleanup was required. Executed the commands you've given and the image has been regenerated.
воскресенье, 28 апреля 2013 г., 17:16:04 UTC+4 пользователь Olivier Lauret написал: > > Hi Andrew, > > Two way I'm doing: > > - Complexe one: I'm usually using "python manage.py thumbnail > cleanup", then "python manage.py thumbnail clear" and finally I restart > the > django. > - Simple one (workaround): download a new image and delete the old one > in the same manipulation. > > It's not the best, so if you can find an solution, this would be great. I > didn't have time yet to look at this issue. > > Regards, > > Olivier > > > > On Apr 26, 2013 8:09 PM, "AndrewLvov" <[email protected] <javascript:>> > wrote: > >> Rob, >> >> thank you for explaining this - the code is now corrected. >> >> However, could you please help with the issue that left unresolved: >> When I open a product page, the url to product image is smth like: >> mysite.com/media/cache/65/8d/658d063b497b2bd1ea6bf135896566c8.jpg, >> and I have no idea how to reset cache to make Satchmo regenerate cached >> image. >> I've tried cache.clear() from django shell, as well as >> ./manage.py thumbnail clear. >> >> The url still points to the file which doesn't exist. How do I regenerate >> it ? >> >> четверг, 25 апреля 2013 г., 23:03:27 UTC+4 пользователь Rob Speed написал: >>> >>> 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<https://docs.djangoproject.com/en/1.4/ref/settings/#media-root> >>> >>> Note: uwsgi isn't involved in this process. >>> >>> -- >>> Rob Speed >>> [email protected] >>> >>> >>> On Thu, Apr 25, 2013 at 2:42 AM, AndrewLvov <[email protected]> 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/**658d063b497b2bd1ea6bf135896566**c8.jpg<http://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-user...@**googlegroups.com. >>>> To post to this group, send email to [email protected]**. >>>> Visit this group at http://groups.google.com/** >>>> group/satchmo-users?hl=en<http://groups.google.com/group/satchmo-users?hl=en> >>>> . >>>> For more options, visit >>>> https://groups.google.com/**groups/opt_out<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 [email protected] <javascript:>. >> To post to this group, send email to [email protected]<javascript:> >> . >> 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/satchmo-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
