django-tables2 how to add a field to the end of parent table? -
i use table defined below
class customertable(basetable): pk = togglecolumn() title = tables.linkcolumn('users:user', args=[a('pk')]) class meta(basetable.meta): model = customer fields = ('pk', 'name', 'address', 'status')
then created extending customertable below
class customer2table(customertable): class meta(basetable.meta): model = customer fields = ('country')
it works well, added new column display country. it's coming first column. how can move end?
fields = ('pk', 'name', 'address', 'status','country')
will work. don't add existing fields again in child class. add field.
Comments
Post a Comment