Fix updated in ticket http://bitbucket.org/chris1610/satchmo/issue/961/thumbnails-dont-work-on-windows#comment-94299
MEDIA_ROOT must be lowercase <http://bitbucket.org/chris1610/satchmo/issue/961/thumbnails-dont-work-on-windows#comment-94299> DIRNAME = os.path.abspath(os.path.dirname(__file__)).replace('\\','/').lower()MEDIA_ROOT = DIRNAME + '/static/' I just made one change on line 262 in utils.py to remove the correct slash if path[0] == '/' or path[0] == '\\': Justin On Wed, Dec 16, 2009 at 12:26 PM, Justin Hamade <[email protected]>wrote: > I found that adding [len(settings.MEDIA_ROOT):] to return new_name in the > _rename function of thumbnail.utils.py works and seems to not break *nix > installs as well. > > I will post this to ticket 961 as well. > > Regards, > Justin > > > > On Wed, Dec 16, 2009 at 10:47 AM, Justin Hamade <[email protected]>wrote: > >> I am fighting this issue right now as well. It seems that the image path >> is being saved as an absolute system path for me ie. >> c:/path/project/static/images/img.jpg and not as images/img.jpg like it is >> on my linux box. >> >> thumbnail.field.upload_dir method seems to work properly (besides the >> slashes being wrong) but upload_to is being altered somewhere incorrectly is >> my guess. >> >> I'm still digging. >> >> >> Justin >> >> >> >> On Wed, Dec 16, 2009 at 9:50 AM, Bruce Kroeze <[email protected]> wrote: >> >>> On Nov 18, 12:33 pm, saurabhdwivedi <[email protected]> wrote: >>>> > i saw the documentation, and i don't think that helps the cause, the >>>> > index.html file inside the shop directory, has these lines which gives >>>> > the path of image: >>>> > >>>> > {% thumbnail product.main_image.picture 85x85 as image %} >>>> > <a href="{{ product.get_absolute_url }}"><img >>>> > src="{{ image.get_absolute_url }}" width="{{ image.width }}" >>>> > height="{{ image.height }}" /></a> >>>> > >>>> > now i don't think that is been explained in documentation any where, >>>> > that is why i am here at google group. >>>> >>> >>> It is difficult to help with Windows setup issues, but here's what I >>> would suggest in your case. >>> >>> - Don't use the development HTML server. Instead, go download "Aspen", >>> which is a great little Python webserver. >>> http://www.zetadev.com/software/aspen/ >>> >>> - Go to your media directory and type "aspen". That will start a >>> webserver serving the current directory at localhost:8080 >>> >>> - Change your MEDIA_URL to "http://localhost:8080/" >>> >>> - Start your store as normal with "manage.py runserver" >>> >>> Even without your problem, this is what I do in development anyway, >>> because I dislike the development webserver, and all the junk it spits out >>> to stdout. I wish they'd use standard python logging, so I could turn it >>> off. >>> >>> -- >>> Bruce Kroeze >>> http://www.ecomsmith.com >>> It's time to hammer your site into shape. >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Satchmo users" group. >>> >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]<satchmo-users%[email protected]> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/satchmo-users?hl=en. >>> >> >> > -- You received this message because you are subscribed to the Google Groups "Satchmo 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/satchmo-users?hl=en.
