[英]Adding note in Django Admin site's TubularInline
目前我的django管理網站的設置看起來像
Topic
submit_date: 2018/09/25
submit_user: blah
Topic-category1
sub-topic field1 field2
---------------------------------
bleh bleh1 bleh2
mlem mlem1 mlem2
Topic-category2
something something1 something2
---------------------------------------
asd asd1 asd2
asd2 asd2-1 asd2-2
我想在Topic-category1
和表格之間添加一個注釋部分,因此它看起來像
Topic-category1
<this is where the note goes, functions like description>
sub-topic field1 field2
---------------------------------
bleh bleh1 bleh2
mlem mlem1 mlem2
django管理員有辦法嗎? 我沒有使用任何自定義表單。 僅使用ModelAdmin
並在此處和此處修改變量
好的,事實是,如果沒有針對Django Admin的自定義表單,我將無法做到。
https://docs.djangoproject.com/en/2.1/ref/contrib/admin/#django.contrib.admin.ModelAdmin.fieldsets
我可以使用fieldsets
添加描述,但由於它無法呈現,因此不適用於TabularInline。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.