Edit/show Primary Key in Django Admin

后端 未结 6 993
时光取名叫无心
时光取名叫无心 2020-12-28 14:12

It appears Django hides fields that are flagged Primary Key from being displayed/edited in the Django admin interface.

Let\'s say I\'d like to input data in which I

6条回答
  •  萌比男神i
    2020-12-28 14:54

    It doesn't make sense to have an optional primary key. Either the PK is an autoincrement, in which case there's no need to edit it, or it's manually specified, in which case it is always required.

    Why do you need this?

提交回复
热议问题