在视图中获取表单字段标签

tun*_*rob 10 django django-forms django-views

在验证并保存表单后,有没有办法获得字段标签文本?我尝试:

for field in form:
    print field.label
Run Code Online (Sandbox Code Playgroud)

但我得到:

django.utils.functional.代理对象位于0x2557f90

任何解决方案?

解决:根据我需要调用它的unicode():

unicode(field.label)
Run Code Online (Sandbox Code Playgroud)