2011-12-22 51 views
3

我得到了基本的Satchmo商店和clonesatchmo運行,但是,圖像不顯示。Django Satchmo沒有圖片

源顯示:

<a href="/product/neat-book/"><img src="" width="" height="" /></a> 

與空白,其中所述圖像源應。 當我運行python manage.py satchmo_check時,我沒有得到任何錯誤。

我在Mac OS X Lion和virtualenv中運行python 2.7.1。

這裏是我的點子凍結>要求:Django的== 1.3.1

PIL==1.1.7 
PyYAML==3.10 
Satchmo==0.9.2 
TRML2PDF==1.0 
-e hg+http://bitbucket.org/bkroeze/django-caching-app-plugins/@b0e77d2243cb5e655472a9f80581663cf59c5aa0#egg=django_caching_app_plugins-dev 
-e hg+http://bitbucket.org/bkroeze/django-keyedcache/@4bf75598cab6c807d15c0dd643da2625ceb7d857#egg=django_keyedcache-dev 
-e hg+http://bitbucket.org/bkroeze/django-livesettings/@68ac220849162a194fcb466de56febd100aa73a1#egg=django_livesettings-dev 
django-registration==0.7 
-e hg+http://bitbucket.org/bkroeze/django-signals-ahoy/@87f60574d64b9e87db3a086ee7ddea25f687a811#egg=django_signals_ahoy-dev 
-e hg+http://bitbucket.org/bkroeze/django-threaded-multihost/@4aebd54035c8fbd38e4a5c5c87ff977a4740c4c2#egg=django_threaded_multihost-dev 
pycrypto==2.4.1 
reportlab==2.5 
sorl-thumbnail==3.2.5 
wsgiref==0.1.2 
yolk==0.4.1 

提前感謝!

回答

0
  1. 嘗試運行此檢查問題python manage.py satchmo_check

  2. 閱讀本頁面底部的有關安裝數據http://www.satchmoproject.com/docs/dev/settings.html#test-and-install-the-data

  3. 的版本你有不匹配什麼在這裏:http://www.satchmoproject.com/docs/dev/new_installation.html 例如本一個不同(沒有檢查全部) easy_install http://www.satchmoproject.com/snapshots/trml2pdf-1.2.tar.gz

我有同樣的問題,一旦我做了

easy_install http://www.satchmoproject.com/snapshots/trml2pdf-1.2.tar.gz 
pip install reportlab 
rm -r store 
python clonesatchmo.py 

它工作得很好。

0

檢查商店目錄中的satchmo.log文件。如果您發現像

Sun, 23 Sep 2012 09:59:41 sorl.thumbnail ERROR Thumbnail tag failed: 
Traceback (most recent call last): 
    File "/home/mosta/VirtualEnv/luana/local/lib/python2.7/site-packages/sorl/thumbnail/templatetags/thumbnail.py", line 45, in render 
    return self._render(context) 
    File "/home/mosta/VirtualEnv/luana/local/lib/python2.7/site-packages/sorl/thumbnail/templatetags/thumbnail.py", line 97, in _render 
    file_, geometry, **options 
    File "/home/mosta/VirtualEnv/luana/local/lib/python2.7/site-packages/sorl/thumbnail/base.py", line 61, in get_thumbnail 
    thumbnail) 
    File "/home/mosta/VirtualEnv/luana/local/lib/python2.7/site-packages/sorl/thumbnail/base.py", line 86, in _create_thumbnail 
    image = default.engine.create(source_image, geometry, options) 
    File "/home/mosta/VirtualEnv/luana/local/lib/python2.7/site-packages/sorl/thumbnail/engines/base.py", line 17, in create 
    image = self.scale(image, geometry, options) 
    File "/home/mosta/VirtualEnv/luana/local/lib/python2.7/site-packages/sorl/thumbnail/engines/base.py", line 49, in scale 
    image = self._scale(image, width, height) 
    File "/home/mosta/VirtualEnv/luana/local/lib/python2.7/site-packages/sorl/thumbnail/engines/pil_engine.py", line 62, in _scale 
    return image.resize((width, height), resample=Image.ANTIALIAS) 
    File "/home/mosta/VirtualEnv/luana/local/lib/python2.7/site-packages/PIL/Image.py", line 1290, in resize 
    self.load() 
    File "/home/mosta/VirtualEnv/luana/local/lib/python2.7/site-packages/PIL/ImageFile.py", line 189, in load 
    d = Image._getdecoder(self.mode, d, a, self.decoderconfig) 
    File "/home/mosta/VirtualEnv/luana/local/lib/python2.7/site-packages/PIL/Image.py", line 385, in _getdecoder 
    raise IOError("decoder %s not available" % decoder_name) 
IOError: decoder zip not available 

很可能您必須在安裝PIL之前安裝一些庫。

在我的情況下,問題是固定的:

> cd $my_virtual_env/lib 
> ln -s /usr/lib/i386-linux-gnu/libjpeg.so 
> ln -s /usr/lib/i386-linux-gnu/libfreetype.so 
> ln -s /usr/lib/i386-linux-gnu/libz.so 
> sudo pip uninstall PIL 
> sudo pip install pillow 

的網頁我看了找到了解決方案:

希望這有助於