Django Jinja2, showing form field is required

前端 未结 0 488
不思量自难忘°
不思量自难忘° 2021-01-02 15:42

How can I make an if condition in Jinja to display something in case that the field is required?

if tried f.is_required | f.required | f.widget.attrs[\'required\'], a

相关标签:
回答
  • 消灭零回复
提交回复
热议问题