How to configure PyCharm for remote OpenStack Horizon Development?

I'm new to Python and currently evaluating PyCharm. An upcoming project requires to do some development on OpenStack's dashboard. My problem is that I cannot get PyCharm to successfully run Horizon (i.e. OpenStack Dashboard) on the remote machine (it's DevStack on a vagrant VM).

So far I managed to run a generic Django project on a remote machine by using vagrant successfully. I also could set up an OpenStack development environment as outlined with successfully.

However the problem starts when I try to combine both. In my use case, I would like to remote develop the Horizon Dashboard by using the DevStack environment. If you do this outside of PyCharm, you would run it with command

/opt/stack/horizon/tools/ ./ runserver

The problem is that I could not find any option within PyCharm's "Run/Debug Configuration" menu which would allow me to include the path "/opt/stack/horizon/tools/" as shown above. As a result I get the below when I run the application within PyCharm.

ssh://vagrant@ -u /home/vagrant/horizon/ runserver
Traceback (most recent call last):
  File "/home/vagrant/horizon/", line 23, in <module>
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/", line 399, in execute_from_command_line
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/", line 392, in execute
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/", line 261, in fetch_command
    commands = get_commands()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/", line 107, in get_commands
    apps = settings.INSTALLED_APPS
  File "/usr/local/lib/python2.7/dist-packages/django/conf/", line 54, in __getattr__
  File "/usr/local/lib/python2.7/dist-packages/django/conf/", line 49, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python2.7/dist-packages/django/conf/", line 132, in __init__
    % (self.SETTINGS_MODULE, e)
ImportError: Could not import settings 'openstack_dashboard.settings' (Is it on sys.path? Is there an import error in the settings file?): No module named xstatic.main

Process finished with exit code 1

Any pointers are very much appreciated!

Please sign in to leave a comment.