Django compressor cannot find custom theme templates

Bug #1582298 reported by Paul Karikh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Diana Whitten

Bug Description

Looks like django compressor can't find templates files from custom theme. When I try to run .manage.py compress I have the following errors:

`Non-existent template at: /home/paul/horizon/openstack_dashboard/themes/custom/templates/header/_header.html`

And Horizon can find that template because I see that overriden page has been changed.

If I run it with material theme with followinf settings:
AVAILABLE_THEMES = [
    ('custom', 'Custom', 'themes/custom'),
    ('material', 'Material', 'themes/material')
]
DEFAULT_THEME = 'material'

I will get the following errors:

Non-existent template at: /home/paul/horizon/openstack_dashboard/themes/material/templates/header/_header.html
Non-existent template at: /home/paul/horizon/openstack_dashboard/themes/material/templates/auth/_splash.html
Non-existent template at: /home/paul/horizon/openstack_dashboard/themes/material/templates/horizon/_sidebar.html
Non-existent template at: /home/paul/horizon/openstack_dashboard/themes/material/templates/header/_brand.html

If I remove DEFAULT_THEME and AVAILABLE_THEMES consts, there is no errors.

Changed in horizon:
status: New → Confirmed
assignee: nobody → Diana Whitten (hurgleburgler)
importance: Undecided → Medium
importance: Medium → High
milestone: none → newton-1
Revision history for this message
Diana Whitten (hurgleburgler) wrote :

The error is annoying, but it doesn't look like it breaks anything, so I'm making this a 'low' priority

Changed in horizon:
importance: High → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/317051

Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/317051
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=4b870b12c139bda715c9d68e53daf80b51034d42
Submitter: Jenkins
Branch: master

commit 4b870b12c139bda715c9d68e53daf80b51034d42
Author: Diana Whitten <email address hidden>
Date: Mon May 16 10:34:21 2016 -0700

    Django compressor cannot find custom theme templates

    An else condition was missed in the Theme Template loader. Some
    templates that are loaded from a theme do start with '/', so
    another elif was added to catching this possibility.

    Closes-bug: #1582298

    Change-Id: I74e147d5abdcb2ab12f1a0c8e7af7fc7f89aff1e

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/323344

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/mitaka)

Reviewed: https://review.openstack.org/323344
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=3c8c403f34aebcce731dcebbaf23f5cc672eed7f
Submitter: Jenkins
Branch: stable/mitaka

commit 3c8c403f34aebcce731dcebbaf23f5cc672eed7f
Author: Diana Whitten <email address hidden>
Date: Mon May 16 10:34:21 2016 -0700

    Django compressor cannot find custom theme templates

    An else condition was missed in the Theme Template loader. Some
    templates that are loaded from a theme do start with '/', so
    another elif was added to catching this possibility.

    Closes-bug: #1582298

    Change-Id: I74e147d5abdcb2ab12f1a0c8e7af7fc7f89aff1e
    (cherry picked from commit 4b870b12c139bda715c9d68e53daf80b51034d42)

tags: added: in-stable-mitaka
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/horizon 10.0.0.0b1

This issue was fixed in the openstack/horizon 10.0.0.0b1 development milestone.

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/horizon 9.0.1

This issue was fixed in the openstack/horizon 9.0.1 release.

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.