簡體   English   中英

在Django Admin網站的TubularInline中添加注釋

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM