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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -