-
默認情況下,Django 的管理員對
ForeignKey
的字段使用 select-box 接口 (raw_id_fields
是您希望為ForeignKey
或ManyToManyField
更改為Input
小部件的字段列表:class BookInline(admin.TabularInline): model = Book raw_id_fields = ("pages",)
本文介紹django.contrib.admin.InlineModelAdmin.raw_id_fields
的用法。
聲明
InlineModelAdmin.raw_id_fields
相關用法
- Python Django InlineModelAdmin.get_extra用法及代碼示例
- Python Django InlineModelAdmin.get_max_num用法及代碼示例
- Python Django Index.expressions用法及代碼示例
- Python Int轉Bytes用法及代碼示例
- Python Django Index.include用法及代碼示例
- Python InteractiveConsole runcode()用法及代碼示例
- Python InteractiveInterpreter runsource()用法及代碼示例
- Python InteractiveInterpreter runcode()用法及代碼示例
- Python IncrementalEncoder encode()用法及代碼示例
- Python PIL Image.draft()用法及代碼示例
- Python PIL Image.thumbnail()用法及代碼示例
- Python PIL Image.new()用法及代碼示例
- Python PIL ImageOps.fit()用法及代碼示例
- Python Wand Image()用法及代碼示例
- Python PIL ImageDraw.Draw.rectangle()用法及代碼示例
- Python PIL ImageEnhance.Color() and ImageEnhance.Contrast()用法及代碼示例
- Python Itertools.zip_longest()用法及代碼示例
- Python PIL Image.getdata()用法及代碼示例
- Python Itertools.compress()用法及代碼示例
- Python PIL ImageFont.truetype()用法及代碼示例
- Python Itertools.count()用法及代碼示例
- Python PIL ImagePath.Path.tolist()用法及代碼示例
- Python PIL Image.transform()用法及代碼示例
- Python PIL Image.quantize()用法及代碼示例
- Python PIL Image.point()用法及代碼示例
注:本文由純淨天空篩選整理自djangoproject.com大神的英文原創作品 django.contrib.admin.InlineModelAdmin.raw_id_fields。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。