5👍
Instead of using ForeignKey
, use OneToOneField
and it will display just one item without the add another link.
1👍
if you want only 1 inline can be added. You can use max_num
option.
class MyModelInline(admin.TabularInline):
model = MyModel
extra = 0
max_num = 1
👤Doni
- [Django]-Django Rest shows TemplateDoesNotExist
- [Django]-Removing Foreign Key
- [Django]-Django using curry to build formsets with custom form
- [Django]-Upload image files with specific directory structure to amazon s3 django
Source:stackexchange.com