向 satchmo 添加幻灯片模块时出错

error adding a slideshow module to satchmo

我找到了一个 django 幻灯片并按照下面的指南安装了它

https://github.com/clarle/django-slides

Download and place the 'slideshow' folder somewhere on your PYTHONPATH. (i placed it in site packages)

Add slideshow to your INSTALLED_APPS under settings.py. (I added it to satchmo store settings.py and also main satchmo settings.py to be sure)

To use a slideshow in another Django application, you can refer to the slideshow object as slideshow.Slideshow in your Django models. (this i was not sure how to do or if i needed to)

If you're not extending base.html, make sure you have jQuery 1.4.2+ and Slides 1.1.7+ in your templates somewhere. Use {% load slideshow_tags %} in whatever template you wish to use a slideshow in.

该模块显示在 satchmo 管理页面中,但是当我尝试添加或更改幻灯片时出现错误

DatabaseError at /admin/slideshow/slideshow/add/no such table: slideshow_slide Request Method: GET Request URL: http://127.0.0.1:8000/admin/slideshow/slideshow/add/ Django Version: 1.4.20 Exception Type: DatabaseError Exception Value:
no such table: slideshow_slide Exception Location: C:\Python27\lib\site-packages\django\db\backends\sqlite3\base.py in execute, line 344 Python Executable: C:\Python27\python.exe Python Version: 2.7.9 Python Path:
['C:\Users\Administrator\MyStores\store', 'C:\Python27\lib\site-packages\satchmo-0.9.3-py2.7.egg', 'C:\Windows\SYSTEM32\python27.zip', 'C:\Python27\DLLs', 'C:\Python27\lib', 'C:\Python27\lib\plat-win', 'C:\Python27\lib\lib-tk', 'C:\Python27', 'C:\Python27\lib\site-packages', 'C:\Python27\lib\site-packages\win32', 'C:\Python27\lib\site-packages\win32\lib', 'C:\Python27\lib\site-packages\Pythonwin', '..\..\apps', '']

我认为它告诉我幻灯片没有数据库设置,但我不确定是否是这种情况,或者是否完全不同,因为我是 python 初学者,我将不胜感激寻求任何帮助。

谢谢

凯夫

我设法在 satchmo

中安装了来自 https://github.com/clarle/django-slides 的幻灯片模块

最后的解决方案非常简单,我所要做的就是将幻灯片文件夹放在我的 PYTHONPATH 中(我把它放在网站包目录中)

我添加了 'slideshow',

到我的自定义 satchmo 商店 settings.py 文件的 INSTALLED_APPS 部分 directory/folder。

最后我打开了一个 terminal/cmd 提示符并执行了以下命令

python manage.py syncdb

很快,模块已添加,数据库已更新为新表,一旦我拥有 运行 服务器并登录到管理页面,我现在就可以设置我的幻灯片

我希望这对需要 satchmo 幻灯片的其他人有所帮助,因为更新数据库的线索来自另一个不同幻灯片的安装指南,我想我会抓住机会试一试。