使用 django_tables2,当在一个页面上使用两个表时,会发生冲突,并且只有一个表会被正确排序,有解决方案吗?
class Table_class1(tables.Table):
uuid = tables.Column()
name1 = tables.Column()
class Meta:
pass
class Table_class2(tables.Table):
uuid = tables.Column()
name2 = tables.Column()
class Meta:
pass
staticmethod
def set_table(request, table_class1, table_lines):
table1 = table_class1(table_lines, prefix="1-")
RequestConfig(request).configure(table)
return table
staticmethod
def set_table(request, table_class2, table_lines):
table2 = table_class2(table_lines, prefix="2-")
RequestConfig(request).configure(table)
return table