AttributeError:'设置'对象没有属性' MERCHANT_SETTINGS'

时间:2015-04-13 03:54:00

标签: python django ubuntu

我是Django的新手,正在关注this github link创建一个接受付款的应用

我成功地能够syncdb但是当我在127.0.0.1:8000运行服务器时,我在网页上看到以下错误。

AttributeError at /

'Settings' object has no attribute 'MERCHANT_SETTINGS'
Request Method: GET
Request URL:    http://127.0.0.1:8000/
Django Version: 1.6.6
Exception Type: AttributeError
Exception Value:    
'Settings' object has no attribute 'MERCHANT_SETTINGS'
Exception Location: /usr/local/lib/python2.7/dist-packages/django/conf/__init__.py in __getattr__, line 55
Python Executable:  /usr/bin/python
Python Version: 2.7.6
Python Path:    
['/home/arjun/merchant-master/example',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-x86_64-linux-gnu',
 '/usr/lib/python2.7/lib-tk',
 '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload',
 '/usr/local/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages/PILcompat',
 '/usr/lib/python2.7/dist-packages/gtk-2.0',
 '/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
 '/usr/lib/python2.7/dist-packages/ubuntuone-client',
 '/usr/lib/python2.7/dist-packages/ubuntuone-control-panel',
 '/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol']

我可以在以下路径中看到MERCHANT_SETTING

merchant/example/settings/local.py-dist

有人可以帮我弄清问题是什么吗?

1 个答案:

答案 0 :(得分:1)

您只需要为Django settings.py添加必要的MERCHANT_SETTINGS即可。 商家installation doc

所以,只需转到您的settings.py,按照此merchant example file添加商家设置。