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:
guoshan 2016-03-31 17:12:12 +08:00
parent bd8b52cbcd
commit a7da1dae4d
4 changed files with 7 additions and 7 deletions

View File

@ -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"

View File

@ -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

View File

@ -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,)

View File

@ -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,)