openstack-dashboard breaks with option DEBUG =False in config file

Bug #980787 reported by koolhead17
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Invalid
Undecided
Gabriel Hurley
horizon (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I have a running setup of horizon working. I have also installed memcached and python-memcache
ii openstack-dashbo 2012.1-0ubuntu2 django web interface to Openstack

When i do DEBUG = False
in my /etc/openstack-dashboard/local_settings.py css breaks. Image and scripts does not load.

i also have
CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
in my /etc/openstack-dashboard/local_settings.py file.

The only solution for this to work smoothly is to keep
DEBUG = True

Related branches

Devin Carlen (devcamcar)
tags: added: essex-backport-potential
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in openstack-dashboard (Ubuntu):
status: New → Confirmed
Revision history for this message
Matthias Schmitz (matthias-sigxcpu) wrote :

According to the Django documentation [1] is it the easiest way to define an Alias for "/static/" pointing to "/usr/share/openstack_dashboard/openstack_dashboard/static/".

So i added the following line to /etc/apache2/conf.d/openstack-dashboard.conf and the static files are served with "Debug =False".

Alias /static /usr/share/openstack-dashboard/openstack_dashboard/static

Best wishes,
Matthias

[1] https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/#serving-files

affects: openstack-dashboard (Ubuntu) → horizon (Ubuntu)
Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :

This is a valid bug, but it's solely in the upstream package's apache configuration. Setting DEBUG=False turns off the development server's static media serving (as it should). That means any installation/deployment not for development needs a properly-configured webserver to serve the site and its static media.

Changed in horizon:
assignee: nobody → Gabriel Hurley (gabriel-hurley)
status: New → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package horizon - 2012.1-0ubuntu5

---------------
horizon (2012.1-0ubuntu5) precise; urgency=low

  [ Adam Gandelman ]
  * debian/patches/turn-off-debug.patch: Enable again
  * debian/openstack-dashboard.conf: Add an Alias mapping '/static'
    to '/usr/share/opensack-dashboard/openstack_dashboard/static/'
    (LP: #980787)
  * debian/patches/allow_alternate_css.patch: Allow loading of ubuntu.css
    and favicon if they exists
  * debian/control: Drop libjs-jquery dependencies

  [ Dave Walker (Daviey) ]
  * debian/control: Drop duplicate depends python-cloudfiles.
 -- Dave Walker (Daviey) <email address hidden> Mon, 23 Apr 2012 10:04:39 +0100

Changed in horizon (Ubuntu):
status: Confirmed → Fix Released
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.