overriding admin field label content in django
I am using admin forms for the CRUD operations. However, I want to add certain characters in the labels generated by the admin. For example, * in case the field is required. How 开发者_如何学Pythoncan I accomplish it?
I can directly go into django admin code and add the * in there (in the file contrib/admin/helpers.py
in this case) But it is not the right way. How can I do it?
There's no "great" way to do this, so your options will be css (add background img), subclassing form, template tags, or template modification. There are some good answers to this previous question here:
How to render form field with information that it is required
精彩评论