How to render form field with information that it is required

前端 未结 5 942
孤街浪徒
孤街浪徒 2020-12-06 04:35

Is there any clever way to make django forms render field with asterisks after fields that are required? Or to provide some other clever for to mark required fields? I would

5条回答
  •  猫巷女王i
    2020-12-06 05:00

    The best way for such purposes I have found is to render form's output via an html template. How to do this is described here. By luck, the example puts an asterisk after required fields just like you want.

提交回复
热议问题