Re: Please I need help on how to create a custom method for a model with list_display

2018-05-20 Thread Godson Rapture
Thanks very much. I have solved the problem. On Sunday, May 20, 2018, Daniel Germano Travieso wrote: > Hello! > > On your case, as stated on the official doc, you should just create a > method on the model you want to display the ManyToMany field on the > list_display that maybe returns the list

Re: Please I need help on how to create a custom method for a model with list_display

2018-05-19 Thread Daniel Germano Travieso
Hello! On your case, as stated on the official doc, you should just create a method on the model you want to display the ManyToMany field on the list_display that maybe returns the list of items from the ManyToMany field. Django avoids using this as it could be a potential overhead as you will

Please I need help on how to create a custom method for a model with list_display

2018-05-19 Thread Godson Rapture
Please I am learning Django 2.0.4 Right now I am learning about Django Admin. I got an error that the value of my list_display should not be a ManyToMany Field. I referred back to Django official doc and I was asked to create a custom method for my model. I tried looking for an example