Ask Your Question
1

Building Dashboard using horizon error

asked 2015-10-12 18:52:35 -0600

vickchak gravatar image

updated 2015-10-13 17:29:54 -0600

Hi,

I set up a Devstack environment in Cent OS 7 from GIT git clone https://github.com/openstack-dev/devs... -b stable/juno

Done successfully and I'm able to login to horizon and launch instances using horizon.

I'm trying to extend the dashboard and add a new one through the following link

http://docs.openstack.org/developer/h...

When I run the command

./run_tests.sh -m startdash mydashboard --target openstack_dashboard/dashboards/mydashboard

I'm getting this error

Traceback (most recent call last):
  File "/opt/stack/horizon/manage.py", line 23, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()<br>
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)<br>
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 261, in fetch_command
    commands = get_commands()<br>
  File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 107, in get_commands
    apps = settings.INSTALLED_APPS<br>
  File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 54, in __getattr__
    self._setup(name)<br>
  File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 49, in _setup
    self._wrapped = Settings(settings_module)<br>
  File "/usr/lib/python2.7/site-packages/django/conf/__init__.py", line 132, in __init__
    % (self.SETTINGS_MODULE, e)

ImportError: Could not import settings 'openstack_dashboard.test.settings' (Is it on sys.path? Is there an import error in the settings file?): No module named utils

The exact command where it fails in run_tests.sh is with this

/opt/stack/horizon/tools/with_venv.sh python /opt/stack/horizon/manage.py -f startdash mydashboard --target openstack_dashboard/dashboards/mydashboard

Tried fiddling with ALLOWEDHOSTS entry and PYTHONPATH etc but nothing works. Stuck on it for 2 days, any help would be very helpful.

Thanks,

edit retag flag offensive close merge delete

Comments

Have you already created the file , like in the tutorial, _50_mydashboard.py under openstack_dashboard/enabled ?

herrsergio gravatar imageherrsergio ( 2015-10-13 13:15:35 -0600 )edit

The error encountered is in the first step itself.didn't reach that far. The exact command where it fails in run_tests.sh is with this

/opt/stack/horizon/tools/with_venv.sh python /opt/stack/horizon/manage.py -f startdash mydashboard --target openstack_dashboard/dashboards/mydashboard

new to Pytho

vickchak gravatar imagevickchak ( 2015-10-13 13:57:17 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-10-14 01:52:09 -0600

vickchak gravatar image

Issue was because the horizon of Devstack cloned from GIT was missing something.

https://github.com/openstack-dev/devs...

When I followed the instructions from http://docs.openstack.org/developer/h... and cloned from horizon GIT directly,

git clone https://github.com/openstack/horizon.git

and then following the instructions on http://docs.openstack.org/developer/h... works fine.

Posting since it might be of use to someone.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-10-12 18:52:35 -0600

Seen: 710 times

Last updated: Oct 14 '15