本帖最后由 xioaxu790 于 2014-7-29 21:43 编辑
问题导读
1、openstack dashboard登录报错,怎么办?
登录Dashboard报错如下:
- AttributeError at /
-
- 'module' object has no attribute 'Login'
-
- Request Method: GET
- Request URL: http://192.168.56.101/
- Django Version: 1.6.5
- Exception Type: AttributeError
- Exception Value:
-
- 'module' object has no attribute 'Login'
-
- Exception Location: /var/www/horizon-2014.1.1/openstack_dashboard/wsgi/../../openstack_dashboard/views.py in splash, line 35
- Python Executable: /usr/bin/python
- Python Version: 2.6.6
- Python Path:
-
- ['/var/www/horizon-2014.1.1/openstack_dashboard/wsgi/../..',
- '/usr/lib64/python26.zip',
- '/usr/lib64/python2.6',
- '/usr/lib64/python2.6/plat-linux2',
- '/usr/lib64/python2.6/lib-tk',
- '/usr/lib64/python2.6/lib-old',
- '/usr/lib64/python2.6/lib-dynload',
- '/usr/lib64/python2.6/site-packages',
- '/usr/lib64/python2.6/site-packages/gtk-2.0',
- '/usr/lib/python2.6/site-packages',
- '/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info',
- '/var/www/horizon-2014.1.1/openstack_dashboard']
复制代码
解决办法:
- vim /var/www/horizon-2014.1.1/openstack_dashboard/views.py
复制代码
修改第22行 from openstack_auth import views 修改为from openstack_auth import forms
修改第35行
form = views.Login(request) 修改为 form = forms.Login(request)
|