Django: Faking a field in the admin interface?

后端 未结 4 2071
轻奢々
轻奢々 2021-01-30 19:00

I have a model, Foo. It has several database properties, and several properties that are calculated based on a combination of factors. I would like to present these

4条回答
  •  独厮守ぢ
    2021-01-30 19:10

    In the edit form, put the property name into readonly_fields (1.2 upwards only).

    In the changelist, put it into list_display.

提交回复
热议问题