1. 给函数设置一个文本

 

def action_checked(self, request):
	pass

action_checked.short_desc = "签到"

# short_desc 给函数设置文本

2. 取出函数的文本内容

text = action_checked.short_desc

#取出函数的函数名
name =action_checked.__name__

3. 打印结果

temp = {'name': func.__name__, 'text': func.short_desc}

print(temp,'######temp')




结果:
{'name': 'action_checked', 'text': '签到'} ######temp

  

  

 

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-27
  • 2022-12-23
  • 2022-12-23
  • 2021-08-22
  • 2021-12-10
  • 2021-09-25
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-24
  • 2022-12-23
相关资源
相似解决方案