Currently, i have a clas开发者_JAVA百科s MyAdmin(admin.ModelAdmin), and i have a field in there called name, which belongs to both list_editable and list_display. The current behavior is such that all fields that is in list_editable displays a form field. However, i would like to change that only when people click on the field would it turn into a editable form field.
Can anyone point me in the right direction on how to do that (which template to edit etc.).
Thank you very much!
Jason
Look at list_editable in model.ModelAdmin. The way I solved click to edit is to use some javascript wizardry to display the edit field only if the user clicks on the field.
Maybe something like that http://www.appelsiini.net/projects/jeditable points you in the right direction?
精彩评论