django - Make boolean values editable in list_display? -


i'd boolean field editable in django admin's list display. instead, have uneditable icons:

enter image description here

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

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -