Public bug reported:

Originally posted on Ask Openstack:
https://ask.openstack.org/en/question/107544/ocata-theme-customization-with-templates/

The problem affects Ocata and Pike for sure.

In my case I have the following dir structure at:
/usr/share/openstack-dashboard/openstack_dashboard/themes/default

.
|-- _styles.scss
|-- _variables.scss
|-- horizon
|   `-- components
|       `-- _selects.scss
|-- img
|   |-- logo-switch.png
|   `-- logo-switchengines.png
`-- templates
    `-- auth
        |-- _footer_switch.html
        |-- _login_page.html
        `-- _splash.html

This was working fine in Newton. Now I am testing Pike and I get:

/usr/share/openstack-dashboard/manage.py collectstatic --noinput

Failes with the following Traceback
Traceback (most recent call last):
  File "/usr/share/openstack-dashboard/manage.py", line 25, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 354, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 303, in execute
    settings.INSTALLED_APPS
  File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 48, in 
__getattr__
    self._setup(name)
  File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 44, in 
_setup
    self._wrapped = Settings(settings_module)
  File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 92, in 
__init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/share/openstack-dashboard/openstack_dashboard/settings.py", line 
442, in <module>
    THEME_COLLECTION_DIR, ROOT_PATH)
  File "/usr/share/openstack-dashboard/openstack_dashboard/utils/settings.py", 
line 332, in find_static_files
    (templates_part, override_path) = theme_file.split('/templates/')
ValueError: need more than 1 value to unpack

** Affects: horizon
     Importance: Undecided
     Assignee: Saverio Proto (zioproto)
         Status: In Progress

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1744239

Title:
  collectstatic broken in case of template customization

Status in OpenStack Dashboard (Horizon):
  In Progress

Bug description:
  Originally posted on Ask Openstack:
  
https://ask.openstack.org/en/question/107544/ocata-theme-customization-with-templates/

  The problem affects Ocata and Pike for sure.

  In my case I have the following dir structure at:
  /usr/share/openstack-dashboard/openstack_dashboard/themes/default

  .
  |-- _styles.scss
  |-- _variables.scss
  |-- horizon
  |   `-- components
  |       `-- _selects.scss
  |-- img
  |   |-- logo-switch.png
  |   `-- logo-switchengines.png
  `-- templates
      `-- auth
          |-- _footer_switch.html
          |-- _login_page.html
          `-- _splash.html

  This was working fine in Newton. Now I am testing Pike and I get:

  /usr/share/openstack-dashboard/manage.py collectstatic --noinput

  Failes with the following Traceback
  Traceback (most recent call last):
    File "/usr/share/openstack-dashboard/manage.py", line 25, in <module>
      execute_from_command_line(sys.argv)
    File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 354, in execute_from_command_line
      utility.execute()
    File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", 
line 303, in execute
      settings.INSTALLED_APPS
    File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 48, 
in __getattr__
      self._setup(name)
    File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 44, 
in _setup
      self._wrapped = Settings(settings_module)
    File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 92, 
in __init__
      mod = importlib.import_module(self.SETTINGS_MODULE)
    File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
      __import__(name)
    File "/usr/share/openstack-dashboard/openstack_dashboard/settings.py", line 
442, in <module>
      THEME_COLLECTION_DIR, ROOT_PATH)
    File 
"/usr/share/openstack-dashboard/openstack_dashboard/utils/settings.py", line 
332, in find_static_files
      (templates_part, override_path) = theme_file.split('/templates/')
  ValueError: need more than 1 value to unpack

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1744239/+subscriptions

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to