Comment 9 for bug 1379761

Revision history for this message
James Page (james-page) wrote :

OK - so the difference in loading with DEBUG = True:

    def get_file_and_storage(self, filename):
        # TODO: the switch probably shouldn't be on DEBUG
        if settings.DEBUG:
            return self.get_file_from_finders(filename)
        else:
            return self.get_file_from_storage(filename)

file_from_finders == good
file_from_storage == bad - and a silent fail right now

forcing and error:

From <string u'// bootstrap overrides:\n$icon-font-path: "../../bo'...>:0
Traceback:
  File "/usr/lib/python2.7/dist-packages/scss/__init__.py", line 498, in manage_children
    self._manage_children_impl(rule, scope)
  File "/usr/lib/python2.7/dist-packages/scss/__init__.py", line 548, in _manage_children_impl
    self._do_import(rule, scope, block)
  File "/usr/lib/python2.7/dist-packages/django_pyscss/scss.py", line 119, in _do_import
    source_file = self._find_source_file(name, relative_to)
  File "/usr/lib/python2.7/dist-packages/django_pyscss/scss.py", line 87, in _find_source_file
    full_filename, storage = self.get_file_and_storage(name)
  File "/usr/lib/python2.7/dist-packages/django_pyscss/scss.py", line 56, in get_file_and_storage
    return self.get_file_from_storage(filename)
  File "/usr/lib/python2.7/dist-packages/django_pyscss/scss.py", line 43, in get_file_from_storage
    raise Exception('%s not found' % filename)
Exception: /usr/share/openstack-dashboard/static/bootstrap/scss/_bootstrap.scss not found