The reference implementation for Building on Horizon doesn't works

Asked by Toby Harris

Hi,

I downloaded the zip archive for horizon demo from https://github.com/gabrielhurley/horizon_demo. When I run the command ./run_tests.sh --runserver to start the dev server I get the below error.

Any idea on how to fix this error? I just unzipped the archive and ran the above command. Do I need to modify any settings?

D:\Python27\Lib\site-packages\horizon_demo-master\horizon_demo-master>python man
age.py runserver
Traceback (most recent call last):
  File "manage.py", line 12, in <module>
    execute_from_command_line(sys.argv)
  File "D:\Python27\lib\site-packages\django\core\management\__init__.py", line
399, in execute_from_command_line
    utility.execute()
  File "D:\Python27\lib\site-packages\django\core\management\__init__.py", line
392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "D:\Python27\lib\site-packages\django\core\management\__init__.py", line
261, in fetch_command
    commands = get_commands()
  File "D:\Python27\lib\site-packages\django\core\management\__init__.py", line
107, in get_commands
    apps = settings.INSTALLED_APPS
  File "D:\Python27\lib\site-packages\django\conf\__init__.py", line 54, in __ge
tattr__
    self._setup(name)
  File "D:\Python27\lib\site-packages\django\conf\__init__.py", line 49, in _set
up
    self._wrapped = Settings(settings_module)
  File "D:\Python27\lib\site-packages\django\conf\__init__.py", line 132, in __i
nit__
    % (self.SETTINGS_MODULE, e)
ImportError: Could not import settings 'demo_dashboard.settings' (Is it on sys.p
ath? Is there an import error in the settings file?): No module named openstack_
dashboard

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Dashboard (Horizon) Edit question
Assignee:
No assignee Edit question
Solved by:
Matthias Runge
Solved:
Last query:
Last reply:
Revision history for this message
Matthias Runge (mrunge) said :
#1

Phew.
That code hasn't been touched for about two years now, and the OpenStack Dashboard is under very active development. I'd take a more recent version from a distribution or from github.com/openstack/horizon

Please also note, this section here is deprecated in favour of ask.openstack.org.

Revision history for this message
Toby Harris (tobyh) said :
#2

Hi Matthias,

Thanks for your reply. I shifted from Windows to Ubuntu and now I don't see this error. However i get a different error now when trying to start the dev server. I am using Ubuntu on a VM created using VMWARE player.

File "manage.py", line 18, in <module>
    from django.core.management import execute_manager
ImportError: No module named core.management

I have verified that Django is installed in my virtual environment. Could you help suggest any solution?

Thanks
Toby

Revision history for this message
Toby Harris (tobyh) said :
#3

Hi,

Just to further update. The problem got resolved after changing the manage.py from #!/usr/bin/env python to #!/usr/bin/env python2.

However now I am getting the below error.

ImportError: Could not import settings 'openstack_dashboard.settings' (Is it on sys.path?): No module named cinderClient.

Any idea why I am getting this error?

Regards
Toby

Revision history for this message
Best Matthias Runge (mrunge) said :
#4

cinderClient with capital 'C'? Honestly?

It seems you're trying to learn OpenStack and esp. Horizon.
Please refer to the official docs http://docs.openstack.org

When choosing a distribution, all requirements (which are clearly not satisfied right now on your install) will be fulfilled.

Every distribution should have one python installed (thus, solvable via /usr/bin/env python.

If you're using ubuntu, apt-get install openstack-dashboard should install you horizon and all its dependencies.

Revision history for this message
Toby Harris (tobyh) said :
#5

Thanks Matthias Runge, that solved my question.

Revision history for this message
Cindy Lu (clu-m) said :
#6

I definitely think we should create a new tutorial. This old one is really, really hindering: http://docs.openstack.org/developer/horizon/topics/tutorial.html.