django - Make boolean values editable in list_display? -
i'd boolean field editable in django admin's list display. instead, have uneditable icons:
my code looks this:
# model class task(models.model): ... is_finished = models.booleanfield() # admin list_display = (..., 'is_finished')
i haven't included is_finished
in readonly_fields
tuple in admin.py
, i'm surprised isn't editable default. doing wrong?
modeladmin.list_editable
need, see doc here. below have example:
class taskadmin(models.modeladmin): list_display = (..., 'is_finished') list_editable = ('is_finished',) # must contain fields in "list_display" #list_display_links = ('foo', 'bar') # must not contain field in common "list_editable"
Comments
Post a Comment