Ask Your Question
0

NameError: name 'panel' is not defined

asked 2014-01-03 10:24:12 -0600

updated 2014-01-22 15:12:34 -0600

Evgeny gravatar image

Hello All,

I am new to customising openstack so was hoping someone could point me right direction? I am following a guide called 'Building on Horizon' (sorry I cant post a link due to being new to the forum). I am following the code steps through to create a very basic Panel and DashBoard to point to my ticketing software.

I have created a dashboard running:

./run_test.sh -m startdash MyAccount

This created me a nice folder structure. I then add the following code to my dashboard.py:

from django.utils.translation import ugettext_lazy as _

import horizon


class Myaccount(horizon.Dashboard):
    name = _("Myaccount")
    slug = "myaccount"
    panels = (invoices,)  # Add your panels here.
    default_panel = 'invoices"  # Specify the slug of the dashboard's default panel.


horizon.register(Myaccount)

This is all well and good. Now I go to create my Panel called 'invoices' by running the following:

./run_tests.sh -m startpanel invoices --dashboard=MyAccount --target=auto

When I run the command, I receive teh following error:

NameError: name 'invoices' is not defined

Do I have to define my 'invoices' panel in dashboard.py before I create it? Or is this a Chicken and Egg issue?

Thanks in advance :)

Paul

edit retag flag offensive close merge delete

Comments

Has anyone seen a way for me to add this extra dashboard?

Paul Sanders gravatar imagePaul Sanders ( 2014-01-06 07:19:14 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-01-08 03:16:47 -0600

Sorry for the bump. Just wondered if anyone else has had this issue before?

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2014-01-03 10:24:12 -0600

Seen: 677 times

Last updated: Jan 08 '14