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)
| 归档时间: |
|
| 查看次数: |
3806 次 |
| 最近记录: |