Tutorials related to class Meta should use new style
The tutorials still use the old style class declaration. class MyTable(DataTable): name = Column('name') email = Column('email') class Meta: name = "my_table" table_actions = (MyAction, MyOtherAction) row_actions - (MyAction) It should use new style (inherit from 'object'). Change-Id: Icad23f6359f5f4866c5819f351f5c5cf1c3521fd closes-bug:#1564193
This commit is contained in:
parent
bd8b52cbcd
commit
a7da1dae4d
@ -25,7 +25,7 @@ represented. Example::
|
||||
name = Column('name')
|
||||
email = Column('email')
|
||||
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
name = "my_table"
|
||||
table_actions = (MyAction, MyOtherAction)
|
||||
row_actions - (MyAction)
|
||||
@ -42,7 +42,7 @@ The following options can be defined in a ``Meta`` class inside a
|
||||
:class:`.DataTable` class. Example::
|
||||
|
||||
class MyTable(DataTable):
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
name = "my_table"
|
||||
verbose_name = "My Table"
|
||||
|
||||
|
@ -378,7 +378,7 @@ Example::
|
||||
required=False),
|
||||
update_action=UpdateCell)
|
||||
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
name = "tenants"
|
||||
verbose_name = _("Projects")
|
||||
# Connection to UpdateRow, so table can fetch row data based on
|
||||
|
@ -252,7 +252,7 @@ following code::
|
||||
verbose_name=_("Availability Zone"))
|
||||
image_name = tables.Column('image_name', verbose_name=_("Image Name"))
|
||||
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
name = "instances"
|
||||
verbose_name = _("Instances")
|
||||
|
||||
@ -309,7 +309,7 @@ must first define the action::
|
||||
Then, we add that action to the table actions for our table.::
|
||||
|
||||
class InstancesTable:
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
table_actions = (MyFilterAction,)
|
||||
|
||||
|
||||
@ -334,7 +334,7 @@ The completed ``tables.py`` file should look like the following::
|
||||
image_name = tables.Column('image_name', \
|
||||
verbose_name=_("Image Name"))
|
||||
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
name = "instances"
|
||||
verbose_name = _("Instances")
|
||||
table_actions = (MyFilterAction,)
|
||||
|
@ -262,7 +262,7 @@ The complete ``tables.py`` file should look like this::
|
||||
zone = tables.Column('availability_zone', verbose_name=_("Availability Zone"))
|
||||
image_name = tables.Column('image_name', verbose_name=_("Image Name"))
|
||||
|
||||
class Meta:
|
||||
class Meta(object):
|
||||
name = "instances"
|
||||
verbose_name = _("Instances")
|
||||
table_actions = (MyFilterAction,)
|
||||
|
Loading…
Reference in New Issue
Block a user