Ask Your Question

Add data to tables

asked 2014-06-09 01:58:31 -0600

toby harris gravatar image


I am trying to add a panel in OpenStack which displays some hard coded values. However when I am trying to access that data from the dashboard, I am getting the below error.

File "/usr/lib/python2.6/site-packages/horizon/tables/", line 1498, in get_object_id
TemplateSyntaxError: 'str' object has no attribute 'id'

Below is the extract from my file

 def get_data(self):
                L = ["test","test1","test3","test4","test5","test6"]
                return L

Any idea on what could go wrong?

Thanks Toby

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-06-11 04:24:15 -0600

toby harris gravatar image

Ok, I was able to solve this issue. This is not the correct way to return the list having some data. There should be a key value combination.

strobj = '[{"id": "111", "name": "test", "email": "", "phone": "123456",}]' 
instances = json.loads(strobj


edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-06-09 01:58:31 -0600

Seen: 133 times

Last updated: Jun 11 '14