manage.py compress --force must be called after changing theme

Bug #1546154 reported by Thomas Goirand
This bug report is a duplicate of:  Bug #1599536: horizon offline generation error. Edit Remove
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppet-horizon
New
Undecided
Unassigned

Bug Description

After a theme is changed in /etc/horizon/local_settings.py, we shall run:

/usr/share/openstack-dashboard/manage.py compress --force

During the Mitaka summit in Tokyo, it was discussed during the Horizon meeting that this wouldn't be needed. However, nobody yet can tell if this was implemented or not. So it should at least be investigated before this bug is closed.

Revision history for this message
Diana Whitten (hurgleburgler) wrote :

There is no way to get around compressing the static assets within Horizon unless you are willing to run with Offline Mode disabled (meaning: COMPRESS_OFFLINE = False). However, this is recommended ONLY for development mode. Production mode should still compress.

There is, however, a new feature that is currently being reviewed in Horizon: https://review.openstack.org/#/c/277220/
This feature allows you to pre-compress multiple themes at a time, making it possible to switch themes without needing to restart the backend.

Revision history for this message
Matthias Runge (mrunge) wrote :

moreover,
./manage.py collectstatic --clear --noinput
should be required as well

Revision history for this message
Matthias Runge (mrunge) wrote :

Thomas, compress should not be required, since one could set
COMPRESS_OFFLINE = False

Revision history for this message
Timur Sufiev (tsufiev-x) wrote :

Matthias, I've just checked it - 'collectstatic' is not required for the 'compress' to run successfully. As Diana stated above COMPRESS_OFFLINE = False is undesirable for production envs since it's too slow.

Revision history for this message
Thomas Goirand (thomas-goirand) wrote :

Matthias,

I do use compress without any collecstatic in Debian, so I can confirm what Timur says. The fact that we can run compress without collecstatic is the very reason why I've always said that we don't need collecstatic at all.

Revision history for this message
Takashi Kajinami (kajinamit) wrote :

I'll mark this as duplicate of bug 1599536 as both are pointing the missing compress command.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.