def short_process_all(self):
if len(str(self.process_all)) > 30:
return '{}...'.format(str(self.process_all)[0:29])
else:
return str(self.process_all)
short_process_all.allow_tags = True
short_process_all.short_description = '问题描述'
short_process_all.admin_order_field = 'code'
标签:...,short,展示,process,self,30,str
From: https://www.cnblogs.com/jubai/p/16770932.html